pub struct AdminConversations {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl AdminConversations
impl AdminConversations
Sourcepub async fn archive(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn archive(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.archive endpoint.
Archive a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.archive
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn convert_private(
&self,
) -> Result<Response<DndEndSchema>, ClientError>
pub async fn convert_private( &self, ) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.convertToPrivate endpoint.
Convert a public channel to a private channel.
FROM: https://api.slack.com/methods/admin.conversations.convertToPrivate
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn create(
&self,
) -> Result<Response<AdminConversationsCreateSchema>, ClientError>
pub async fn create( &self, ) -> Result<Response<AdminConversationsCreateSchema>, ClientError>
This function performs a POST to the /admin.conversations.create endpoint.
Create a public or private channel-based conversation.
FROM: https://api.slack.com/methods/admin.conversations.create
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn delete(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn delete(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.delete endpoint.
Delete a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.delete
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
This function performs a POST to the /admin.conversations.disconnectShared endpoint.
Disconnect a connected channel from one or more workspaces.
FROM: https://api.slack.com/methods/admin.conversations.disconnectShared
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn get_conversation_pref(
&self,
channel_id: &str,
) -> Result<Response<AdminConversationsGetConversationPrefsSchemaData>, ClientError>
pub async fn get_conversation_pref( &self, channel_id: &str, ) -> Result<Response<AdminConversationsGetConversationPrefsSchemaData>, ClientError>
This function performs a GET to the /admin.conversations.getConversationPrefs endpoint.
Get conversation preferences for a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.getConversationPrefs
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:read.channel_id: &str– The channel to get preferences for.
Sourcepub async fn get_team(
&self,
channel_id: &str,
cursor: &str,
limit: i64,
) -> Result<Response<AdminConversationsGetTeamsSchema>, ClientError>
pub async fn get_team( &self, channel_id: &str, cursor: &str, limit: i64, ) -> Result<Response<AdminConversationsGetTeamsSchema>, ClientError>
This function performs a GET to the /admin.conversations.getTeams endpoint.
Get all the workspaces a given public or private channel is connected to within this Enterprise org.
FROM: https://api.slack.com/methods/admin.conversations.getTeams
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:read.channel_id: &str– The channel to determine connected workspaces within the organization for.cursor: &str– Setcursortonext_cursorreturned by the previous call to list items in the next page.limit: i64– The maximum number of items to return. Must be between 1 - 1000 both inclusive.
Sourcepub async fn invite(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn invite(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.invite endpoint.
Invite a user to a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.invite
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn rename(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn rename(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.rename endpoint.
Rename a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.rename
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn search(
&self,
team_ids: &str,
query: &str,
limit: i64,
cursor: &str,
search_channel_types: &str,
sort: &str,
sort_dir: &str,
) -> Result<Response<AdminConversationsSearchSchema>, ClientError>
pub async fn search( &self, team_ids: &str, query: &str, limit: i64, cursor: &str, search_channel_types: &str, sort: &str, sort_dir: &str, ) -> Result<Response<AdminConversationsSearchSchema>, ClientError>
This function performs a GET to the /admin.conversations.search endpoint.
Search for public or private channels in an Enterprise organization.
FROM: https://api.slack.com/methods/admin.conversations.search
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:read.team_ids: &str– Comma separated string of team IDs, signifying the workspaces to search through.query: &str– Name of the the channel to query by.limit: i64– Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.cursor: &str– Setcursortonext_cursorreturned by the previous call to list items in the next page.search_channel_types: &str– The type of channel to include or exclude in the search. For exampleprivatewill search private channels, whileprivate_excludewill exclude them. For a full list of types, check the Types section.sort: &str– Possible values arerelevant(search ranking based on what we think is closest),name(alphabetical),member_count(number of users in the channel), andcreated(date channel was created). You can optionally pair this with thesort_dirarg to change how it is sorted .sort_dir: &str– Sort direction. Possible values areascfor ascending order like (1, 2, 3) or (a, b, c), anddescfor descending order like (3, 2, 1) or (c, b, a).
Sourcepub async fn set_conversation_prefs(
&self,
) -> Result<Response<DndEndSchema>, ClientError>
pub async fn set_conversation_prefs( &self, ) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.setConversationPrefs endpoint.
Set the posting permissions for a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.setConversationPrefs
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn set_teams(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn set_teams(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.setTeams endpoint.
Set the workspaces in an Enterprise grid org that connect to a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.setTeams
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.
Sourcepub async fn unarchive(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn unarchive(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /admin.conversations.unarchive endpoint.
Unarchive a public or private channel.
FROM: https://api.slack.com/methods/admin.conversations.unarchive
Parameters:
token: &str– Authentication token. Requires scope:admin.conversations:write.