pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub async fn find_thread_ts(
&self,
query: SearchQuery<'_>,
post_ts_seconds: f64,
) -> Result<String>
pub async fn find_thread_ts( &self, query: SearchQuery<'_>, post_ts_seconds: f64, ) -> Result<String>
When posting to threads, need to find the thread ts. Right after posting message, it can take a little bit to show up, this retries the query until a ts after the post ts is found, waiting 3 seconds in between tries, with max of 10 tries.
Sourcepub async fn search(&self, query: SearchQuery<'_>) -> Result<SearchResponse>
pub async fn search(&self, query: SearchQuery<'_>) -> Result<SearchResponse>
https://docs.slack.dev/reference/methods/search.messages/
Source§impl Client
impl Client
pub async fn send_message<'a>( &self, text: &'a str, thread_ts: impl Into<Option<&'a str>>, blocks: impl Into<Option<&'a [Block<'a>]>>, ) -> Result<Response>
pub async fn send_message_with_header( &self, header: &str, info: impl Into<Option<&str>>, ) -> Result<Response>
pub async fn send_mrkdwn_message<'a>( &self, thread_ts: impl Into<Option<&'a str>>, text: &str, ) -> Result<Response>
pub async fn send_owned_message<'a>( &self, text: &'a str, thread_ts: impl Into<Option<&'a str>>, blocks: impl AsRef<[OwnedBlock]>, ) -> Result<()>
pub async fn send_owned_message_manually_chunked<'a>( &self, text: &'a str, thread_ts: impl Into<Option<&'a str>>, blocks: impl AsRef<[OwnedBlock]>, chunks: usize, ) -> Result<()>
pub async fn send_owned_message_single<'a>( &self, text: &'a str, thread_ts: impl Into<Option<&'a str>>, blocks: impl Into<Option<&[OwnedBlock]>>, ) -> Result<Response>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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