summaryrefslogtreecommitdiff
path: root/src/kraken/models.rs
blob: 13c524cf7269799c65e2ad490ab0a9686bad49b9 (plain)
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
extern crate serde_json;
extern crate chrono;

#[derive(Debug, Deserialize)]
pub struct Clip {
    pub slug: String,
    pub tracking_id: String,
    pub url: String,
    pub embed_url: String,
    pub embed_html: String,
    pub broadcaster: UserData,
    pub curator: UserData,
    pub vod: Vod,
    pub game: String,
    pub language: String,
    pub title: String,
    pub views: i32,
    pub duration: f32,
    pub created_at: String,
    pub thumbnails: Thumbnails,
}


#[derive(Debug, Deserialize)]
pub struct Thumbnails {
    pub medium: String,
    pub small: String,
    pub tiny: String,
}

#[derive(Debug, Deserialize)]
pub struct UserData {
    pub id: String,
    pub name: String,
    pub display_name: String,
    pub channel_url: String,
    pub logo: String,
}

#[derive(Debug, Deserialize)]
pub struct Vod {
    pub id: String,
    pub url: String,
}