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
27
28
29
30
31
32
33
34
35
36
37
use crate::{methods::method::*, types::ChatId};
use failure::Error;
use serde::Serialize;
#[derive(Clone, Debug, Serialize)]
pub struct DeleteChatPhoto {
chat_id: ChatId,
}
impl DeleteChatPhoto {
pub fn new<C: Into<ChatId>>(chat_id: C) -> Self {
DeleteChatPhoto {
chat_id: chat_id.into(),
}
}
}
impl Method for DeleteChatPhoto {
type Response = bool;
fn get_request(&self) -> Result<RequestBuilder, Error> {
RequestBuilder::json("deleteChatPhoto", &self)
}
}