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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
use super::*;

/// <https://vk.com/dev/objects/video>
#[derive(Deserialize, Clone, Debug)]
pub struct Video {
    pub id: Integer,
    pub owner_id: Integer,
    pub title: String,
    pub description: String,
    pub duration: Integer,

    pub photo_130: Option<String>,
    pub photo_320: Option<String>,
    pub photo_640: Option<String>,
    pub photo_800: Option<String>,
    pub photo_1280: Option<String>,

    pub first_frame_130: Option<String>,
    pub first_frame_320: Option<String>,
    pub first_frame_640: Option<String>,
    pub first_frame_800: Option<String>,
    pub first_frame_1280: Option<String>,

    pub date: Integer,
    pub adding_date: Integer,
    pub views: Integer,
    pub comments: Integer,
    pub player: String,
    pub platform: Option<String>,
    pub can_edit: Option<Integer>,
    pub can_add: Integer,
    pub is_private: Option<Integer>,
    pub access_key: Option<String>,
    pub processing: Option<Integer>,
    pub live: Option<Integer>,
    pub upcoming: Option<Integer>,
    pub is_favorite: Option<Boolean>,
}

/// <https://vk.com/dev/objects/video_cat_element>
#[derive(Deserialize, Clone, Debug)]
pub struct CatalogElement {
    pub id: Integer,
    pub owner_id: Integer,
    pub title: String,

    #[serde(rename = "type")]
    pub type_: String,

    pub description: Option<String>,
    pub duration: Option<Integer>,
    pub photo_130: Option<String>,
    pub photo_160: Option<String>,
    pub photo_320: Option<String>,
    pub photo_640: Option<String>,
    pub photo_800: Option<String>,
    pub date: Option<Integer>,
    pub adding_date: Option<Integer>,
    pub views: Option<Integer>,
    pub comments: Option<Integer>,
    pub can_add: Option<Integer>,
    pub can_edit: Option<Integer>,
    pub is_private: Option<Integer>,
    pub count: Option<Integer>,
    pub updated_time: Option<Integer>,
}

/// <https://vk.com/dev/objects/video_cat_block>
#[derive(Deserialize, Clone, Debug)]
pub struct CatalogBlock {
    pub items: Vec<CatalogElement>,
    pub id: Integer,
    pub name: String,
    pub next: String,
    pub view: String,
    pub can_hide: Integer,

    #[serde(rename = "type")]
    pub type_: String,
}