slack_web_api v1.2.1 SlackWebAPI.Api.Pins
API calls for all endpoints tagged Pins
.
Link to this section Summary
Functions
Pins an item to a channel.
Lists items pinned to a channel.
Un-pins an item from a channel.
Link to this section Functions
Link to this function
pins_add(connection, opts \\ [])
pins_add(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Pins an item to a channel.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
pins:write
- :file_comment (String.t): File comment to pin.
- :timestamp (float()): Timestamp of the message to pin.
- :file (String.t): File to pin.
- :channel (String.t): Channel to pin the item in.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
Link to this function
pins_list(connection, opts \\ [])
pins_list(Tesla.Env.client(), keyword()) :: {:ok, Map.t()} | {:error, Tesla.Env.t()}
Lists items pinned to a channel.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
pins:read
- :channel (String.t): Channel to get pinned items for.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %SlackWebAPI.Model.Map{}} on success {:error, info} on failure
Link to this function
pins_remove(connection, opts \\ [])
pins_remove(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Un-pins an item from a channel.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
pins:write
- :file_comment (String.t): File comment to un-pin.
- :timestamp (float()): Timestamp of the message to un-pin.
- :file (String.t): File to un-pin.
- :channel (String.t): Channel where the item is pinned to.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure