gsuite_api/
channels.rs

1use crate::Client;
2use crate::ClientResult;
3
4pub struct Channels {
5    pub client: Client,
6}
7
8impl Channels {
9    #[doc(hidden)]
10    pub fn new(client: Client) -> Self {
11        Channels { client }
12    }
13
14    /**
15     * This function performs a `POST` to the `/admin/directory_v1/channels/stop` endpoint.
16     *
17     * Stops watching resources through this channel.
18     */
19    pub async fn admin_stop(
20        &self,
21        body: &crate::types::Channel,
22    ) -> ClientResult<crate::Response<()>> {
23        let url = self.client.url("/admin/directory_v1/channels/stop", None);
24        self.client
25            .post(
26                &url,
27                crate::Message {
28                    body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
29                    content_type: Some("application/json".to_string()),
30                },
31            )
32            .await
33    }
34}