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 pub async fn stop(&self, body: &crate::types::Channel) -> ClientResult<crate::Response<()>> {
20 let url = self.client.url("/channels/stop", None);
21 self.client
22 .post(
23 &url,
24 crate::Message {
25 body: Some(reqwest::Body::from(serde_json::to_vec(body)?)),
26 content_type: Some("application/json".to_string()),
27 },
28 )
29 .await
30 }
31}