slack_chat_api/emoji.rs
1use crate::Client;
2use crate::ClientResult;
3
4pub struct Emoji {
5 pub client: Client,
6}
7
8impl Emoji {
9 #[doc(hidden)]
10 pub fn new(client: Client) -> Self {
11 Emoji { client }
12 }
13
14 /**
15 * This function performs a `GET` to the `/emoji.list` endpoint.
16 *
17 * Lists custom emoji for a team.
18 *
19 * FROM: <https://api.slack.com/methods/emoji.list>
20 *
21 * **Parameters:**
22 *
23 * * `token: &str` -- Authentication token. Requires scope: `emoji:read`.
24 */
25 pub async fn list(&self) -> ClientResult<crate::Response<crate::types::DndEndSchema>> {
26 let url = self.client.url("/emoji.list", None);
27 self.client
28 .get(
29 &url,
30 crate::Message {
31 body: None,
32 content_type: None,
33 },
34 )
35 .await
36 }
37}