slack_web_api v1.2.1 SlackWebAPI.Api.Dnd
API calls for all endpoints tagged Dnd
.
Link to this section Summary
Functions
Ends the current user's Do Not Disturb session immediately.
Ends the current user's snooze mode immediately.
Retrieves a user's current Do Not Disturb status.
Turns on Do Not Disturb mode for the current user, or changes its duration.
Retrieves the Do Not Disturb status for up to 50 users on a team.
Link to this section Functions
dnd_end_dnd(connection, opts \\ [])
dnd_end_dnd(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Ends the current user's Do Not Disturb session immediately.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
dnd_end_snooze(connection, opts \\ [])
dnd_end_snooze(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Ends the current user's snooze mode immediately.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
dnd_info(connection, opts \\ [])
dnd_info(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Retrieves a user's current Do Not Disturb status.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
dnd:read
- :user (String.t): User to fetch status for (defaults to current user)
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
dnd_set_snooze(connection, opts \\ [])
dnd_set_snooze(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Turns on Do Not Disturb mode for the current user, or changes its duration.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
dnd_team_info(connection, opts \\ [])
dnd_team_info(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Retrieves the Do Not Disturb status for up to 50 users on a team.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
dnd:read
- :users (String.t): Comma-separated list of users to fetch Do Not Disturb status for
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure