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
81
82
83
84
85
use crate::structs::common::*;
use chrono::offset::FixedOffset;
use chrono::DateTime;
use serde::Deserialize;
use std::string::String;
#[derive(Debug, Deserialize)]
pub struct Root {
pub data: Vec<Series>,
pub page: Option<u16>,
pub per_page: Option<u16>,
pub total_pages: Option<u16>,
pub total_results: Option<u32>,
}
#[derive(Debug, Deserialize)]
pub struct Series {
#[serde(rename = "_index")]
pub index: String,
pub sort: Vec<u64>,
pub id: u32,
#[serde(rename = "type")]
pub kind: String,
pub uuid: String,
pub attributes: Attributes,
pub links: Links,
pub canonical_links: CanonicalLinks,
pub included: Included,
}
#[derive(Debug, Deserialize)]
pub struct Attributes {
pub title: String,
pub slug: String,
pub genres: Vec<String>,
pub is_sponsors_only: bool,
pub updated_at: DateTime<FixedOffset>,
pub published_at: DateTime<FixedOffset>,
pub last_episode_golive_at: DateTime<FixedOffset>,
pub summary: String,
pub category: String,
pub channel_id: String,
pub channel_slug: String,
pub season_count: u16,
pub episode_count: u32,
pub season_order: String,
pub episode_order: String,
pub blacklisted_countries: Vec<String>,
}
#[derive(Debug, Deserialize)]
pub struct Links {
#[serde(rename = "self")]
pub reference: String,
pub seasons: String,
pub bonus_features: String,
pub related: String,
pub product_collections: String,
pub latest_episode: String,
pub s1e1: String,
pub rich_card_reference_url: Option<String>,
}
#[derive(Debug, Deserialize)]
pub struct CanonicalLinks {
#[serde(rename = "self")]
pub reference: String,
pub s1e1: String,
}
#[derive(Debug, Deserialize)]
pub struct Included {
pub images: Vec<Image>,
}