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/admin.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
Invite a user to a workspace. FROM: https://api.slack.com/methods/admin.users.invite
Remove users from a workspace. FROM: https://api.slack.com/methods/admin.users.remove
pub async fn update_user_profile(
&self,
user_id: &str,
profile: UserProfile
) -> Result<(), APIError>
pub async fn update_user_profile(
&self,
user_id: &str,
profile: UserProfile
) -> Result<(), APIError>
Set a user’s profile information, including custom status. FROM: https://api.slack.com/methods/users.profile.set