Struct slack_chat_api::Slack [−][src]
pub struct Slack { /* fields omitted */ }Expand description
Entrypoint for interacting with the Slack API.
Implementations
Create a new Slack client struct. It takes a type that can convert into
an &str (String or Vec<u8> for example). As long as the function is
given a valid API Token and Workspace ID your requests will work.
pub fn new_from_env<C, T, R>(workspace_id: C, token: T, user_token: R) -> Self where
C: ToString,
T: ToString,
R: ToString,
pub fn new_from_env<C, T, R>(workspace_id: C, token: T, user_token: R) -> Self where
C: ToString,
T: ToString,
R: ToString,
Create a new Slack client struct from environment variables. It
takes a type that can convert into
an &str (String or Vec<u8> for example). As long as the function is
given a valid API Token and Workspace ID your requests will work.
List users on a workspace. FROM: https://api.slack.com/methods/users.list
Get the current user’s identity. FROM: https://api.slack.com/methods/users.identity
Get billable info. FROM: https://api.slack.com/methods/team.billableInfo
Open a view. FROM: https://api.slack.com/methods/views.open
Get channel id from name.
List channels, defaults to public channels. FROM: https://api.slack.com/methods/conversations.list
Invite a user to a workspace. FROM: https://api.slack.com/methods/admin.users.invite
Join a channel. FROM: https://api.slack.com/methods/conversations.join
pub fn post_message<'life0, 'life_self, 'async_recursion>(
&'life_self self,
body: &'life0 FormattedMessage
) -> Pin<Box<dyn Future<Output = Result<FormattedMessageResponse>> + Send + 'async_recursion>> where
'life0: 'async_recursion,
'life_self: 'async_recursion,
pub fn post_message<'life0, 'life_self, 'async_recursion>(
&'life_self self,
body: &'life0 FormattedMessage
) -> Pin<Box<dyn Future<Output = Result<FormattedMessageResponse>> + Send + 'async_recursion>> where
'life0: 'async_recursion,
'life_self: 'async_recursion,
Post message to a channel. FROM: https://api.slack.com/methods/chat.postMessage
Remove users from a workspace. FROM: https://api.slack.com/methods/admin.users.remove
Set a user’s profile information, including custom status. FROM: https://api.slack.com/methods/users.profile.set
Auto Trait Implementations
impl !RefUnwindSafe for Slack
impl !UnwindSafe for Slack
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more