Struct slack_chat_api::pins::Pins
source · pub struct Pins {
pub client: Client,
}Fields§
§client: ClientImplementations§
source§impl Pins
impl Pins
sourcepub async fn add(&self) -> Result<DndEndSchema>
pub async fn add(&self) -> Result<DndEndSchema>
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<Vec<PinsListResponseAnyOf>>
pub async fn list(&self, channel: &str) -> Result<Vec<PinsListResponseAnyOf>>
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<Vec<PinsListResponseAnyOf>>
pub async fn list_all( &self, channel: &str ) -> Result<Vec<PinsListResponseAnyOf>>
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<DndEndSchema>
pub async fn remove(&self) -> Result<DndEndSchema>
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.