pub struct Usergroups {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Usergroups
impl Usergroups
Sourcepub async fn create(
&self,
) -> Result<Response<UsergroupsCreateSchema>, ClientError>
pub async fn create( &self, ) -> Result<Response<UsergroupsCreateSchema>, ClientError>
This function performs a POST to the /usergroups.create endpoint.
Create a User Group
FROM: https://api.slack.com/methods/usergroups.create
Parameters:
token: &str– Authentication token. Requires scope:usergroups:write.
Sourcepub async fn disable(
&self,
) -> Result<Response<UsergroupsCreateSchema>, ClientError>
pub async fn disable( &self, ) -> Result<Response<UsergroupsCreateSchema>, ClientError>
This function performs a POST to the /usergroups.disable endpoint.
Disable an existing User Group
FROM: https://api.slack.com/methods/usergroups.disable
Parameters:
token: &str– Authentication token. Requires scope:usergroups:write.
Sourcepub async fn enable(
&self,
) -> Result<Response<UsergroupsCreateSchema>, ClientError>
pub async fn enable( &self, ) -> Result<Response<UsergroupsCreateSchema>, ClientError>
This function performs a POST to the /usergroups.enable endpoint.
Enable a User Group
FROM: https://api.slack.com/methods/usergroups.enable
Parameters:
token: &str– Authentication token. Requires scope:usergroups:write.
Sourcepub async fn list(
&self,
include_users: bool,
include_count: bool,
include_disabled: bool,
) -> Result<Response<UsergroupsListSchema>, ClientError>
pub async fn list( &self, include_users: bool, include_count: bool, include_disabled: bool, ) -> Result<Response<UsergroupsListSchema>, ClientError>
This function performs a GET to the /usergroups.list endpoint.
List all User Groups for a team
FROM: https://api.slack.com/methods/usergroups.list
Parameters:
include_users: bool– Include the list of users for each User Group.token: &str– Authentication token. Requires scope:usergroups:read.include_count: bool– Include the number of users in each User Group.include_disabled: bool– Include disabled User Groups.
Sourcepub async fn update(
&self,
) -> Result<Response<UsergroupsCreateSchema>, ClientError>
pub async fn update( &self, ) -> Result<Response<UsergroupsCreateSchema>, ClientError>
This function performs a POST to the /usergroups.update endpoint.
Update an existing User Group
FROM: https://api.slack.com/methods/usergroups.update
Parameters:
token: &str– Authentication token. Requires scope:usergroups:write.