pub struct Pins {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Pins
impl Pins
Sourcepub async fn add(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn add(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /pins.add endpoint.
Pins an item to a channel.
FROM: https://api.slack.com/methods/pins.add
Parameters:
token: &str– Authentication token. Requires scope:pins:write.
Sourcepub async fn list(
&self,
channel: &str,
) -> Result<Response<Vec<PinsListResponseAnyOf>>, ClientError>
pub async fn list( &self, channel: &str, ) -> Result<Response<Vec<PinsListResponseAnyOf>>, ClientError>
This function performs a GET to the /pins.list endpoint.
Lists items pinned to a channel.
FROM: https://api.slack.com/methods/pins.list
Parameters:
token: &str– Authentication token. Requires scope:pins:read.channel: &str– Channel to get pinned items for.
Sourcepub async fn list_all(
&self,
channel: &str,
) -> Result<Response<Vec<PinsListResponseAnyOf>>, ClientError>
pub async fn list_all( &self, channel: &str, ) -> Result<Response<Vec<PinsListResponseAnyOf>>, ClientError>
This function performs a GET to the /pins.list endpoint.
As opposed to list, this function returns all the pages of the request at once.
Lists items pinned to a channel.
Sourcepub async fn remove(&self) -> Result<Response<DndEndSchema>, ClientError>
pub async fn remove(&self) -> Result<Response<DndEndSchema>, ClientError>
This function performs a POST to the /pins.remove endpoint.
Un-pins an item from a channel.
FROM: https://api.slack.com/methods/pins.remove
Parameters:
token: &str– Authentication token. Requires scope:pins:write.
Auto Trait Implementations§
impl Freeze for Pins
impl !RefUnwindSafe for Pins
impl Send for Pins
impl Sync for Pins
impl Unpin for Pins
impl UnsafeUnpin for Pins
impl !UnwindSafe for Pins
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