Skip to main content

flix_tmdb/model/
collection.rs

1use super::id::{CollectionId, MovieId};
2
3/// A deserialized Collection from the TMDB API
4#[derive(Debug, Clone, serde::Deserialize)]
5pub struct Collection {
6	/// The collection's TMDB ID
7	pub id: CollectionId,
8	/// The collection's title
9	#[serde(rename = "name")]
10	pub title: String,
11	/// The collection's overview
12	pub overview: String,
13	/// The list of movies that are part of this collection
14	#[serde(rename = "parts")]
15	pub movies: Vec<Item>,
16}
17
18/// A deserialized collection item from the TMDB API
19#[derive(Debug, Clone, serde::Deserialize)]
20pub struct Item {
21	/// The movie's TMDB ID
22	pub id: MovieId,
23	/// The movie's title
24	pub title: String,
25}