slack_web_api v1.2.1 SlackWebAPI.Api.Mpim
API calls for all endpoints tagged Mpim
.
Link to this section Summary
Functions
Closes a multiparty direct message channel.
Fetches history of messages and events from a multiparty direct message.
Lists multiparty direct message channels for the calling user.
Sets the read cursor in a multiparty direct message channel.
This method opens a multiparty direct message.
Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.
Link to this section Functions
mpim_close(connection, opts \\ [])
mpim_close(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Closes a multiparty direct message channel.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
mpim:write
- :channel (String.t): MPIM to close.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
mpim_history(connection, opts \\ [])
mpim_history(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Fetches history of messages and events from a multiparty direct message.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :count (integer()): Number of messages to return, between 1 and 1000.
- :unreads (boolean()): Include
unread_count_display
in the output? - :inclusive (boolean()): Include messages with latest or oldest timestamp in results.
- :token (String.t): Authentication token. Requires scope:
mpim:history
- :oldest (float()): Start of time range of messages to include in results.
- :channel (String.t): Multiparty direct message to fetch history for.
- :latest (float()): End of time range of messages to include in results.
Returns
{:ok, %{}} on success {:error, info} on failure
mpim_list(connection, opts \\ [])
mpim_list(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Lists multiparty direct message channels for the calling user.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :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:
mpim: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.
- :cursor (String.t): Parameter for pagination. Set
Returns
{:ok, %{}} on success {:error, info} on failure
mpim_mark(connection, opts \\ [])
mpim_mark(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Sets the read cursor in a multiparty direct message channel.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
mpim:write
- :ts (float()): Timestamp of the most recently seen message.
- :channel (String.t): multiparty direct message channel to set reading cursor in.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
mpim_open(connection, opts \\ [])
mpim_open(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
This method opens a multiparty direct message.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
mpim:write
- :users (String.t): Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
mpim_replies(connection, opts \\ [])
mpim_replies(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Retrieve a thread of messages posted to a direct message conversation from a multiparty direct message.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :thread_ts (float()): Unique identifier of a thread's parent message.
- :token (String.t): Authentication token. Requires scope:
mpim:history
- :channel (String.t): Multiparty direct message channel to fetch thread from.
Returns
{:ok, %{}} on success {:error, info} on failure