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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
use super::*;
#[derive(Deserialize, Clone, Debug)]
pub struct Poll {
pub id: Integer,
pub owner_id: Integer,
pub created: Integer,
pub question: String,
pub votes: Integer,
pub answers: Vec<Answer>,
pub anonymous: Boolean,
pub multiple: Boolean,
pub answer_ids: Option<Vec<Integer>>,
pub end_date: Integer,
pub closed: Boolean,
pub is_board: Boolean,
pub can_edit: Boolean,
pub can_vote: Boolean,
pub can_report: Boolean,
pub can_share: Boolean,
pub author_id: Integer,
pub photo: Option<photo::Photo>,
pub background: Option<Background>,
pub friends: Vec<Integer>,
}
#[derive(Deserialize, Clone, Debug)]
pub struct Answer {
pub id: Integer,
pub text: String,
pub votes: Integer,
pub rate: Number,
}
#[derive(Deserialize, Clone, Debug)]
pub struct Background {
pub id: Integer,
#[serde(rename = "type")]
pub type_: String,
pub angle: Option<Integer>,
pub color: String,
pub width: Option<Integer>,
pub height: Option<Integer>,
pub images: Option<photo::Size>,
pub points: Option<GradientPoint>,
}
#[derive(Deserialize, Clone, Debug)]
pub struct GradientPoint {
pub position: Number,
pub color: String,
}