1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use anyhow::Result;

use crate::Client;

pub struct Channels {
    pub client: Client,
}

impl Channels {
    #[doc(hidden)]
    pub fn new(client: Client) -> Self {
        Channels { client }
    }

    /**
    * This function performs a `POST` to the `/admin/directory_v1/channels/stop` endpoint.
    *
    * Stops watching resources through this channel.
    */
    pub async fn admin_stop(&self, body: &crate::types::Channel) -> Result<()> {
        let url = "/admin/directory_v1/channels/stop".to_string();
        self.client
            .post(&url, Some(reqwest::Body::from(serde_json::to_vec(body)?)))
            .await
    }
}