AdminConversations

Struct AdminConversations 

Source
pub struct AdminConversations {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl AdminConversations

Source

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.
Source

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.
Source

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.
Source

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.
Source

pub async fn disconnect_shared( &self, ) -> Result<Response<DndEndSchema>, ClientError>

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.
Source

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.
Source

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 – Set cursor to next_cursor returned 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.
Source

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.
Source

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.
Source

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 – Set cursor to next_cursor returned 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 example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section.
  • sort: &str – Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted .
  • sort_dir: &str – Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).
Source

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.
Source

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.
Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,