slack_web_api v1.2.1 SlackWebAPI.Api.Reactions
API calls for all endpoints tagged Reactions
.
Link to this section Summary
Functions
Adds a reaction to an item.
Gets reactions for an item.
Lists reactions made by a user.
Removes a reaction from an item.
Link to this section Functions
Link to this function
reactions_add(connection, opts \\ [])
reactions_add(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Adds a reaction to an item.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
reactions:write
- :name (String.t): Reaction (emoji) name.
- :file_comment (String.t): File comment to add reaction to. Now that file threads work the way you'd expect, this argument is deprecated. Specify the timestamp and channel of the message associated with a file instead.
- :timestamp (float()): Timestamp of the message to add reaction to.
- :file (String.t): File to add reaction to. Now that file threads work the way you'd expect, this argument is deprecated. Specify the timestamp and channel of the message associated with a file instead.
- :channel (String.t): Channel where the message to add reaction to was posted.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
Link to this function
reactions_get(connection, opts \\ [])
reactions_get(Tesla.Env.client(), keyword()) :: {:ok, Map.t()} | {:error, Tesla.Env.t()}
Gets reactions for an item.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :full (boolean()): If true always return the complete reaction list.
- :file_comment (String.t): File comment to get reactions for.
- :timestamp (float()): Timestamp of the message to get reactions for.
- :token (String.t): Authentication token. Requires scope:
reactions:read
- :file (String.t): File to get reactions for.
- :channel (String.t): Channel where the message to get reactions for was posted.
Returns
{:ok, %SlackWebAPI.Model.Map{}} on success {:error, info} on failure
Link to this function
reactions_list(connection, opts \\ [])
reactions_list(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Lists reactions made by a user.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :count (String.t):
- :full (boolean()): If true always return the complete reaction list.
- :cursor (String.t): Parameter for pagination. Set
cursor
equal to thenext_cursor
attribute returned by the previous request'sresponse_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:
reactions: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.
- :user (String.t): Show reactions made by this user. Defaults to the authed user.
- :page (String.t):
Returns
{:ok, %{}} on success {:error, info} on failure
Link to this function
reactions_remove(connection, opts \\ [])
reactions_remove(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Removes a reaction from an item.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
reactions:write
- :name (String.t): Reaction (emoji) name.
- :file_comment (String.t): File comment to remove reaction from.
- :timestamp (float()): Timestamp of the message to remove reaction from.
- :file (String.t): File to remove reaction from.
- :channel (String.t): Channel where the message to remove reaction from was posted.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure