slack_web_api v1.2.1 SlackWebAPI.Api.Usergroups
API calls for all endpoints tagged Usergroups
.
Link to this section Summary
Functions
Create a User Group
Disable an existing User Group
Enable a User Group
List all User Groups for a team
Update an existing User Group
List all users in a User Group
Update the list of users for a User Group
Link to this section Functions
usergroups_create(connection, opts \\ [])
usergroups_create(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Create a User Group
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
usergroups:write
- :handle (String.t): A mention handle. Must be unique among channels, users and User Groups.
- :description (String.t): A short description of the User Group.
- :channels (String.t): A comma separated string of encoded channel IDs for which the User Group uses as a default.
- :include_count (boolean()): Include the number of users in each User Group.
- :name (String.t): A name for the User Group. Must be unique among User Groups.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
usergroups_disable(connection, opts \\ [])
usergroups_disable(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Disable an existing User Group
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
usergroups:write
- :include_count (boolean()): Include the number of users in the User Group.
- :usergroup (String.t): The encoded ID of the User Group to disable.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
usergroups_enable(connection, opts \\ [])
usergroups_enable(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Enable a User Group
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
usergroups:write
- :include_count (boolean()): Include the number of users in the User Group.
- :usergroup (String.t): The encoded ID of the User Group to enable.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
usergroups_list(connection, opts \\ [])
usergroups_list(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
List all User Groups for a team
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :include_users (boolean()): Include the list of users for each User Group.
- :token (String.t): Authentication token. Requires scope:
usergroups:read
- :include_count (boolean()): Include the number of users in each User Group.
- :include_disabled (boolean()): Include disabled User Groups.
Returns
{:ok, %{}} on success {:error, info} on failure
usergroups_update(connection, opts \\ [])
usergroups_update(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Update an existing User Group
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
usergroups:write
- :handle (String.t): A mention handle. Must be unique among channels, users and User Groups.
- :description (String.t): A short description of the User Group.
- :channels (String.t): A comma separated string of encoded channel IDs for which the User Group uses as a default.
- :include_count (boolean()): Include the number of users in the User Group.
- :usergroup (String.t): The encoded ID of the User Group to update.
- :name (String.t): A name for the User Group. Must be unique among User Groups.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure
usergroups_users_list(connection, opts \\ [])
usergroups_users_list(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
List all users in a User Group
Parameters
- connection (SlackWebAPI.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
usergroups_users_update(connection, opts \\ [])
usergroups_users_update(Tesla.Env.client(), keyword()) :: {:ok, map()} | {:error, Tesla.Env.t()}
Update the list of users for a User Group
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t): Authentication token. Requires scope:
usergroups:write
- :users (String.t): A comma separated string of encoded user IDs that represent the entire list of users for the User Group.
- :include_count (boolean()): Include the number of users in the User Group.
- :usergroup (String.t): The encoded ID of the User Group to update.
- :token (String.t): Authentication token. Requires scope:
Returns
{:ok, %{}} on success {:error, info} on failure