pub struct SlackClient {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl SlackClient
impl SlackClient
pub fn new(bearer_token: String) -> Self
Sourcepub async fn get_conversation_list(&self) -> Result<String, Error>
pub async fn get_conversation_list(&self) -> Result<String, Error>
https://api.slack.com/methods/conversations.list
Sourcepub async fn send_message(
&self,
payload: &Value,
response_url: Option<&str>,
) -> Result<Response, Error>
pub async fn send_message( &self, payload: &Value, response_url: Option<&str>, ) -> Result<Response, Error>
https://api.slack.com/methods/chat.postMessage errors: https://api.slack.com/methods/chat.postMessage#errors
Sourcepub async fn delete_message(
&self,
channel_id: &str,
message_ts: &str,
) -> Result<Response, Error>
pub async fn delete_message( &self, channel_id: &str, message_ts: &str, ) -> Result<Response, Error>
https://api.slack.com/methods/chat.delete
pub async fn get_user_profile(&self, user_id: &str) -> GetUserProfileResult
Auto Trait Implementations§
impl Freeze for SlackClient
impl !RefUnwindSafe for SlackClient
impl Send for SlackClient
impl Sync for SlackClient
impl Unpin for SlackClient
impl !UnwindSafe for SlackClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more