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
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<Season>,
}
#[derive(Debug, Deserialize)]
pub struct Season {
#[serde(rename = "_index")]
pub index: String,
pub sort: Vec<u16>,
pub id: u32,
#[serde(rename = "type")]
pub kind: String,
pub uuid: String,
pub attributes: Attributes,
pub links: Links,
pub included: Included,
}
#[derive(Debug, Deserialize)]
pub struct Attributes {
pub title: String,
pub description: String,
pub slug: String,
pub number: u16,
pub show_id: String,
pub show_slug: String,
pub episodes_available: EpisodesAvailable,
pub published_at: DateTime<FixedOffset>,
}
#[derive(Debug, Deserialize)]
pub struct EpisodesAvailable {
pub sponsor: bool,
pub member: bool,
pub public: bool,
}
#[derive(Debug, Deserialize)]
pub struct Links {
#[serde(rename = "self")]
pub reference: String,
pub episodes: String,
}
#[derive(Debug, Deserialize)]
pub struct Included {
pub images: Vec<Image>,
}