@@ -40,6 +40,44 @@ pub struct SimplifiedMovie {
40
40
pub title : String // The title of the movie.
41
41
}
42
42
43
+ #[ derive( Deserialize ) ]
44
+ #[ rustfmt:: skip]
45
+ pub struct Show {
46
+ pub backdrop_path : Option < String > , // The show's backdrop path.
47
+ pub created_by : Vec < CreatedBy > , // The show's creators.
48
+ pub episode_run_time : Vec < i64 > , // An array containing the show's episode runtimes.
49
+ pub first_air_date : NaiveDate , // The date the show first aired.
50
+ pub genres : Vec < Genre > , // The genres that the show is in.
51
+ pub homepage : String , // The show's homepage.
52
+ pub id : i64 , // The show's id on The Movie Database.
53
+ pub in_production : bool , // Whether or not the show is currently in production.
54
+ pub languages : Vec < String > , // The show's available languages.
55
+ pub last_air_date : NaiveDate , // When the show last aired an episode.
56
+ pub last_episode_to_air : EpisodeToAir , // The show's last aired episode.
57
+ pub name : String , // The name of the show.
58
+ pub next_episode_to_air : Option < EpisodeToAir > , // The show's next scheduled episode.
59
+ pub networks : Vec < NetworkOrStudio > , // The networks or services that air the show.
60
+ pub number_of_episodes : i64 , // The total number of episodes the show has aired.
61
+ pub number_of_seasons : i64 , // The total number of seasons the show has released.
62
+ pub origin_country : Vec < String > , // The country where the show originated.
63
+ pub original_language : String , // The original language of the show.
64
+ pub original_name : String , // The show's original name.
65
+ pub overview : String , // The show's overview.
66
+ pub popularity : f64 , // An integer containing the show's popularity value.
67
+ pub poster_path : Option < String > , // The show's poster path.
68
+ #[ serde( rename = "production_companies" ) ]
69
+ pub studios : Vec < NetworkOrStudio > , // The studios that produce and manage the show.
70
+ pub seasons : Vec < Season > , // A vector array containing information on the show's individual seasons.
71
+ pub spoken_languages : Vec < Language > , // A vector array containing information about the show's spoken languages.
72
+ pub status : String , // The status of the show; can be Returning Series, Cancelled, or Ended.
73
+ pub tagline : String , // The show's tagline.
74
+ #[ serde( rename = "type" ) ]
75
+ pub format : String , // The format of the show; can be Scripted, News, or Unscripted.
76
+ pub vote_average : f64 , // The show's average user score on The Movie Database.
77
+ pub vote_count : i64 , // The show's total amount of user votes on The Movie Database.
78
+ // pub external_ids: ExternalId // The external IDs associated with the show, e.g. the external IMDb ID.
79
+ }
80
+
43
81
#[ derive( Deserialize ) ]
44
82
#[ rustfmt:: skip]
45
83
pub struct Collection {
@@ -49,66 +87,6 @@ pub struct Collection {
49
87
pub backdrop_path : String // the backdrop of the collection.
50
88
}
51
89
52
- #[ derive( Deserialize ) ]
53
- #[ rustfmt:: skip]
54
- pub struct Genre {
55
- pub id : u64 , // The genre's ID.
56
- pub name : String // The genre's name.
57
- }
58
-
59
- #[ derive( Deserialize ) ]
60
- #[ rustfmt:: skip]
61
- pub struct ProductionCompany {
62
- pub name : String , // The friendly name of the production company.
63
- pub id : u64 , // The ID of the production company on The Movie Database.
64
- pub origin_country : String // The country of origin of the production company.
65
- }
66
-
67
- #[ derive( Deserialize ) ]
68
- #[ rustfmt:: skip]
69
- pub struct ProductionCountry {
70
- pub iso_3166_1 : String , // The ISO standard shortcode of the production country.
71
- pub name : String // The friendly name of the production country.
72
- }
73
-
74
- #[ derive( Deserialize ) ]
75
- #[ rustfmt:: skip]
76
- pub struct Show {
77
- pub backdrop_path : Option < String > , // The show's backdrop path.
78
- pub created_by : Vec < CreatedBy > , // The show's creators.
79
- pub episode_run_time : Vec < i64 > , // An array containing the show's episode runtimes.
80
- pub first_air_date : NaiveDate , // The date the show first aired.
81
- pub genres : Vec < Genre > , // The genres that the show is in.
82
- pub homepage : String , // The show's homepage.
83
- pub id : i64 , // The show's id on The Movie Database.
84
- pub in_production : bool , // Whether or not the show is currently in production.
85
- pub languages : Vec < String > , // The show's available languages.
86
- pub last_air_date : NaiveDate , // When the show last aired an episode.
87
- pub last_episode_to_air : EpisodeToAir , // The show's last aired episode.
88
- pub name : String , // The name of the show.
89
- pub next_episode_to_air : Option < EpisodeToAir > , // The show's next scheduled episode.
90
- pub networks : Vec < NetworkOrStudio > , // The networks or services that air the show.
91
- pub number_of_episodes : i64 , // The total number of episodes the show has aired.
92
- pub number_of_seasons : i64 , // The total number of seasons the show has released.
93
- pub origin_country : Vec < String > , // The country where the show originated.
94
- pub original_language : String , // The original language of the show.
95
- pub original_name : String , // The show's original name.
96
- pub overview : String , // The show's overview.
97
- pub popularity : f64 , // An integer containing the show's popularity value.
98
- pub poster_path : Option < String > , // The show's poster path.
99
- #[ serde( rename = "production_companies" ) ]
100
- pub studios : Vec < NetworkOrStudio > , // The studios that produce and manage the show.
101
- pub seasons : Vec < Season > , // A vector array containing information on the show's individual seasons.
102
- pub spoken_languages : Vec < Language > , // A vector array containing information about the show's spoken languages.
103
- pub status : String , // The status of the show; can be Returning Series, Cancelled, or Ended.
104
- pub tagline : String , // The show's tagline.
105
- #[ serde( rename = "type" ) ]
106
- pub format : String , // The format of the show; can be Scripted, News, or Unscripted.
107
- pub vote_average : f64 , // The show's average user score on The Movie Database.
108
- pub vote_count : i64 , // The show's total amount of user votes on The Movie Database.
109
- // pub external_ids: ExternalId // The external IDs associated with the show, e.g. the external IMDb ID.
110
- }
111
-
112
90
#[ derive( Deserialize ) ]
113
91
#[ rustfmt:: skip]
114
92
pub struct CreatedBy {
@@ -119,6 +97,13 @@ pub struct CreatedBy {
119
97
pub profile_path : Option < String > // The (optional) profile path of the given creator.
120
98
}
121
99
100
+ #[ derive( Deserialize ) ]
101
+ #[ rustfmt:: skip]
102
+ pub struct Genre {
103
+ pub id : u64 , // The genre's ID.
104
+ pub name : String // The genre's name.
105
+ }
106
+
122
107
#[ derive( Deserialize ) ]
123
108
#[ rustfmt:: skip]
124
109
pub struct EpisodeToAir {
@@ -155,6 +140,7 @@ pub struct Season {
155
140
pub season_number : i64 // The season's numerical number.
156
141
}
157
142
143
+
158
144
#[ derive( Deserialize ) ]
159
145
#[ rustfmt:: skip]
160
146
pub struct Language {
@@ -176,3 +162,18 @@ pub struct ExternalId {
176
162
pub twitter_id : Option < String > , // The ID of the show's Twitter profile.
177
163
pub id : Option < i64 > // The show's The Movie Database identifier.
178
164
}
165
+
166
+ #[ derive( Deserialize ) ]
167
+ #[ rustfmt:: skip]
168
+ pub struct ProductionCompany {
169
+ pub name : String , // The friendly name of the production company.
170
+ pub id : u64 , // The ID of the production company on The Movie Database.
171
+ pub origin_country : String // The country of origin of the production company.
172
+ }
173
+
174
+ #[ derive( Deserialize ) ]
175
+ #[ rustfmt:: skip]
176
+ pub struct ProductionCountry {
177
+ pub iso_3166_1 : String , // The ISO standard shortcode of the production country.
178
+ pub name : String // The friendly name of the production country.
179
+ }
0 commit comments