SlackWebAPI v1.2.0 SlackWebAPI.Api.Stars View Source

API calls for all endpoints tagged Stars.

Link to this section Summary

Functions

Adds a star to an item.

Lists stars for a user.

Removes a star from an item.

Link to this section Functions

Link to this function

stars_add(connection, opts \\ [])

View Source
stars_add(Tesla.Env.client(), keyword()) ::
  {:ok, map()} | {:error, Tesla.Env.t()}

Adds a star to an item.

Parameters

  • connection (SlackWebAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :token (String.t): Authentication token. Requires scope: stars:write
    • :file_comment (String.t): File comment to add star to.
    • :timestamp (float()): Timestamp of the message to add star to.
    • :channel (String.t): Channel to add star to, or channel where the message to add star to was posted (used with timestamp).
    • :file (String.t): File to add star to.

Returns

{:ok, %{}} on success {:error, info} on failure

Link to this function

stars_list(connection, opts \\ [])

View Source
stars_list(Tesla.Env.client(), keyword()) ::
  {:ok, map()} | {:error, Tesla.Env.t()}

Lists stars for a user.

Parameters

  • connection (SlackWebAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :count (String.t):
    • :cursor (String.t): Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See pagination for more details.
    • :token (String.t): Authentication token. Requires scope: stars:read
    • :limit (integer()): The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.
    • :page (String.t):

Returns

{:ok, %{}} on success {:error, info} on failure

Link to this function

stars_remove(connection, opts \\ [])

View Source
stars_remove(Tesla.Env.client(), keyword()) ::
  {:ok, map()} | {:error, Tesla.Env.t()}

Removes a star from an item.

Parameters

  • connection (SlackWebAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters

    • :token (String.t): Authentication token. Requires scope: stars:write
    • :file_comment (String.t): File comment to remove star from.
    • :timestamp (float()): Timestamp of the message to remove star from.
    • :channel (String.t): Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp).
    • :file (String.t): File to remove star from.

Returns

{:ok, %{}} on success {:error, info} on failure