Struct slack_chat_api::usergroups::Usergroups
source · pub struct Usergroups {
pub client: Client,
}Fields§
§client: ClientImplementations§
source§impl Usergroups
impl Usergroups
sourcepub async fn create(&self) -> Result<UsergroupsCreateSchema>
pub async fn create(&self) -> Result<UsergroupsCreateSchema>
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<UsergroupsCreateSchema>
pub async fn disable(&self) -> Result<UsergroupsCreateSchema>
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<UsergroupsCreateSchema>
pub async fn enable(&self) -> Result<UsergroupsCreateSchema>
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<UsergroupsListSchema>
pub async fn list( &self, include_users: bool, include_count: bool, include_disabled: bool ) -> Result<UsergroupsListSchema>
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<UsergroupsCreateSchema>
pub async fn update(&self) -> Result<UsergroupsCreateSchema>
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.