pub struct SlackClient { /* private fields */ }Implementations§
Source§impl SlackClient
impl SlackClient
pub fn new(token: SecretString) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_required_scopes(self, required_scopes: Vec<String>) -> Self
pub fn required_scopes(&self) -> &[String]
pub async fn auth_info(&self) -> Result<SlackAuthInfo>
pub async fn ensure_healthy(&self) -> Result<SlackAuthInfo>
Trait Implementations§
Source§impl Clone for SlackClient
impl Clone for SlackClient
Source§fn clone(&self) -> SlackClient
fn clone(&self) -> SlackClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SlackClient
impl Debug for SlackClient
Source§impl LivenessProbe for SlackClient
impl LivenessProbe for SlackClient
Source§fn provider_name(&self) -> &str
fn provider_name(&self) -> &str
Lower-cased provider name surfaced in the
NotImplemented
default and in doctor output. Concrete impls override
to return e.g. "github", "gitlab".Source§fn test<'life0, 'life1, 'async_trait>(
&'life0 self,
_token: &'life1 SecretBox<str>,
) -> Pin<Box<dyn Future<Output = Result<LivenessResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn test<'life0, 'life1, 'async_trait>(
&'life0 self,
_token: &'life1 SecretBox<str>,
) -> Pin<Box<dyn Future<Output = Result<LivenessResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Probe the upstream with
token. The default impl returns
NotImplemented so providers without a native
introspection endpoint can opt-in trivially.Source§impl MessengerProvider for SlackClient
impl MessengerProvider for SlackClient
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get the provider name for logging (e.g. “slack”).
Source§fn get_chats<'life0, 'async_trait>(
&'life0 self,
params: GetChatsParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MessengerChat>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_chats<'life0, 'async_trait>(
&'life0 self,
params: GetChatsParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MessengerChat>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get available chats, channels, groups, or DMs.
Source§fn get_messages<'life0, 'async_trait>(
&'life0 self,
params: GetMessagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MessengerMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_messages<'life0, 'async_trait>(
&'life0 self,
params: GetMessagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MessengerMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get message history for a specific chat.
Source§fn search_messages<'life0, 'async_trait>(
&'life0 self,
params: SearchMessagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MessengerMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search_messages<'life0, 'async_trait>(
&'life0 self,
params: SearchMessagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<MessengerMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Search messages across chats.
Source§fn send_message<'life0, 'async_trait>(
&'life0 self,
params: SendMessageParams,
) -> Pin<Box<dyn Future<Output = Result<MessengerMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_message<'life0, 'async_trait>(
&'life0 self,
params: SendMessageParams,
) -> Pin<Box<dyn Future<Output = Result<MessengerMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a message to a chat or thread.
Source§impl UserProvider for SlackClient
impl UserProvider for SlackClient
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Provider name for logging / error reporting.
Source§fn get_user_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_profile<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve a user by their provider-native id (Slack
U0123, Jira
accountId / name, ClickUp user id, etc.).Source§fn lookup_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup_user_by_email<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a user by email. Returns
None if the provider can issue
the query but there is no match, Error::ProviderUnsupported
when the provider simply doesn’t expose an email lookup.Auto Trait Implementations§
impl !RefUnwindSafe for SlackClient
impl !UnwindSafe for SlackClient
impl Freeze for SlackClient
impl Send for SlackClient
impl Sync for SlackClient
impl Unpin for SlackClient
impl UnsafeUnpin 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