slack_chat_api/
files_comments.rs

1use crate::Client;
2use crate::ClientResult;
3
4pub struct FilesComments {
5    pub client: Client,
6}
7
8impl FilesComments {
9    #[doc(hidden)]
10    pub fn new(client: Client) -> Self {
11        FilesComments { client }
12    }
13
14    /**
15     * This function performs a `POST` to the `/files.comments.delete` endpoint.
16     *
17     * Deletes an existing comment on a file.
18     *
19     * FROM: <https://api.slack.com/methods/files.comments.delete>
20     *
21     * **Parameters:**
22     *
23     * * `token: &str` -- Authentication token. Requires scope: `files:write:user`.
24     */
25    pub async fn delete(&self) -> ClientResult<crate::Response<crate::types::DndEndSchema>> {
26        let url = self.client.url("/files.comments.delete", None);
27        self.client
28            .post(
29                &url,
30                crate::Message {
31                    body: None,
32                    content_type: Some("application/x-www-form-urlencoded".to_string()),
33                },
34            )
35            .await
36    }
37}