pub struct Conversations {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Conversations
impl Conversations
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 /conversations.archive endpoint.
Archives a conversation.
FROM: https://api.slack.com/methods/conversations.archive
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn close(
&self,
) -> Result<Response<ConversationsCloseSuccessSchema>, ClientError>
pub async fn close( &self, ) -> Result<Response<ConversationsCloseSuccessSchema>, ClientError>
This function performs a POST to the /conversations.close endpoint.
Closes a direct message or multi-person direct message.
FROM: https://api.slack.com/methods/conversations.close
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn create(
&self,
) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
pub async fn create( &self, ) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
This function performs a POST to the /conversations.create endpoint.
Initiates a public or private channel-based conversation
FROM: https://api.slack.com/methods/conversations.create
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn history(
&self,
channel: &str,
latest: f64,
oldest: f64,
inclusive: bool,
limit: i64,
cursor: &str,
) -> Result<Response<ConversationsHistorySuccessSchema>, ClientError>
pub async fn history( &self, channel: &str, latest: f64, oldest: f64, inclusive: bool, limit: i64, cursor: &str, ) -> Result<Response<ConversationsHistorySuccessSchema>, ClientError>
This function performs a GET to the /conversations.history endpoint.
Fetches a conversation’s history of messages and events.
FROM: https://api.slack.com/methods/conversations.history
Parameters:
token: &str– Authentication token. Requires scope:conversations:history.channel: &str– Conversation ID to fetch history for.latest: f64– End of time range of messages to include in results.oldest: f64– Start of time range of messages to include in results.inclusive: bool– Include messages with latest or oldest timestamp in results only when either timestamp is specified.limit: i64– The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn’t been reached.cursor: &str– Paginate through collections of data by setting thecursorparameter to anext_cursorattribute returned by a previous request’sresponse_metadata. Default value fetches the first “page” of the collection. See pagination for more detail.
Sourcepub async fn info(
&self,
channel: &str,
include_locale: bool,
include_num_members: bool,
) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
pub async fn info( &self, channel: &str, include_locale: bool, include_num_members: bool, ) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
This function performs a GET to the /conversations.info endpoint.
Retrieve information about a conversation.
FROM: https://api.slack.com/methods/conversations.info
Parameters:
token: &str– Authentication token. Requires scope:conversations:read.channel: &str– Conversation ID to learn more about.include_locale: bool– Set this totrueto receive the locale for this conversation. Defaults tofalse.include_num_members: bool– Set totrueto include the member count for the specified conversation. Defaults tofalse.
Sourcepub async fn invite(
&self,
) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
pub async fn invite( &self, ) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
This function performs a POST to the /conversations.invite endpoint.
Invites users to a channel.
FROM: https://api.slack.com/methods/conversations.invite
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn join(
&self,
) -> Result<Response<ConversationsJoinSuccessSchema>, ClientError>
pub async fn join( &self, ) -> Result<Response<ConversationsJoinSuccessSchema>, ClientError>
This function performs a POST to the /conversations.join endpoint.
Joins an existing conversation.
FROM: https://api.slack.com/methods/conversations.join
Parameters:
token: &str– Authentication token. Requires scope:channels:write.
Sourcepub async fn kick(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn kick(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /conversations.kick endpoint.
Removes a user from a conversation.
FROM: https://api.slack.com/methods/conversations.kick
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn leave(
&self,
) -> Result<Response<ConversationsLeaveSuccessSchema>, ClientError>
pub async fn leave( &self, ) -> Result<Response<ConversationsLeaveSuccessSchema>, ClientError>
This function performs a POST to the /conversations.leave endpoint.
Leaves a conversation.
FROM: https://api.slack.com/methods/conversations.leave
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn list(
&self,
exclude_archived: bool,
types: &str,
limit: i64,
cursor: &str,
) -> Result<Response<ConversationsListSuccessSchema>, ClientError>
pub async fn list( &self, exclude_archived: bool, types: &str, limit: i64, cursor: &str, ) -> Result<Response<ConversationsListSuccessSchema>, ClientError>
This function performs a GET to the /conversations.list endpoint.
Lists all channels in a Slack team.
FROM: https://api.slack.com/methods/conversations.list
Parameters:
token: &str– Authentication token. Requires scope:conversations:read.exclude_archived: bool– Set totrueto exclude archived channels from the list.types: &str– Mix and match channel types by providing a comma-separated list of any combination ofpublic_channel,private_channel,mpim,im.limit: i64– The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn’t been reached. Must be an integer no larger than 1000.cursor: &str– Paginate through collections of data by setting thecursorparameter to anext_cursorattribute returned by a previous request’sresponse_metadata. Default value fetches the first “page” of the collection. See pagination for more detail.
Sourcepub async fn mark(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn mark(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /conversations.mark endpoint.
Sets the read cursor in a channel.
FROM: https://api.slack.com/methods/conversations.mark
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn member(
&self,
channel: &str,
limit: i64,
cursor: &str,
) -> Result<Response<ConversationsMembersSuccessSchema>, ClientError>
pub async fn member( &self, channel: &str, limit: i64, cursor: &str, ) -> Result<Response<ConversationsMembersSuccessSchema>, ClientError>
This function performs a GET to the /conversations.members endpoint.
Retrieve members of a conversation.
FROM: https://api.slack.com/methods/conversations.members
Parameters:
token: &str– Authentication token. Requires scope:conversations:read.channel: &str– ID of the conversation to retrieve members for.limit: i64– The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn’t been reached.cursor: &str– Paginate through collections of data by setting thecursorparameter to anext_cursorattribute returned by a previous request’sresponse_metadata. Default value fetches the first “page” of the collection. See pagination for more detail.
Sourcepub async fn open(
&self,
) -> Result<Response<ConversationsOpenSuccessSchema>, ClientError>
pub async fn open( &self, ) -> Result<Response<ConversationsOpenSuccessSchema>, ClientError>
This function performs a POST to the /conversations.open endpoint.
Opens or resumes a direct message or multi-person direct message.
FROM: https://api.slack.com/methods/conversations.open
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn rename(
&self,
) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
pub async fn rename( &self, ) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
This function performs a POST to the /conversations.rename endpoint.
Renames a conversation.
FROM: https://api.slack.com/methods/conversations.rename
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn replie(
&self,
channel: &str,
ts: f64,
latest: f64,
oldest: f64,
inclusive: bool,
limit: i64,
cursor: &str,
) -> Result<Response<ConversationsRepliesSuccessSchema>, ClientError>
pub async fn replie( &self, channel: &str, ts: f64, latest: f64, oldest: f64, inclusive: bool, limit: i64, cursor: &str, ) -> Result<Response<ConversationsRepliesSuccessSchema>, ClientError>
This function performs a GET to the /conversations.replies endpoint.
Retrieve a thread of messages posted to a conversation
FROM: https://api.slack.com/methods/conversations.replies
Parameters:
token: &str– Authentication token. Requires scope:conversations:history.channel: &str– Conversation ID to fetch thread from.ts: f64– Unique identifier of a thread’s parent message.tsmust be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced bytswill return - it is just an ordinary, unthreaded message.latest: f64– End of time range of messages to include in results.oldest: f64– Start of time range of messages to include in results.inclusive: bool– Include messages with latest or oldest timestamp in results only when either timestamp is specified.limit: i64– The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn’t been reached.cursor: &str– Paginate through collections of data by setting thecursorparameter to anext_cursorattribute returned by a previous request’sresponse_metadata. Default value fetches the first “page” of the collection. See pagination for more detail.
Sourcepub async fn set_purpose(
&self,
) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
pub async fn set_purpose( &self, ) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
This function performs a POST to the /conversations.setPurpose endpoint.
Sets the purpose for a conversation.
FROM: https://api.slack.com/methods/conversations.setPurpose
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.
Sourcepub async fn set_topic(
&self,
) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
pub async fn set_topic( &self, ) -> Result<Response<ConversationsInfoSuccessSchema>, ClientError>
This function performs a POST to the /conversations.setTopic endpoint.
Sets the topic for a conversation.
FROM: https://api.slack.com/methods/conversations.setTopic
Parameters:
token: &str– Authentication token. Requires scope: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 /conversations.unarchive endpoint.
Reverses conversation archival.
FROM: https://api.slack.com/methods/conversations.unarchive
Parameters:
token: &str– Authentication token. Requires scope:conversations:write.