You've already forked flix
Improve model
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "flix-tmdb"
|
||||
version = "0.0.3"
|
||||
version = "0.0.4"
|
||||
|
||||
categories = []
|
||||
description = "Clients and models for fetching data from TMDB"
|
||||
|
||||
@@ -22,8 +22,8 @@ impl Client {
|
||||
pub async fn get_details(
|
||||
&self,
|
||||
id: impl Into<ShowId>,
|
||||
season: impl Into<i32>,
|
||||
episode: impl Into<i32>,
|
||||
season: impl Into<u32>,
|
||||
episode: impl Into<u32>,
|
||||
language: Option<&str>,
|
||||
) -> Result<Episode, Error> {
|
||||
Ok(self
|
||||
|
||||
@@ -22,7 +22,7 @@ impl Client {
|
||||
pub async fn get_details(
|
||||
&self,
|
||||
id: impl Into<ShowId>,
|
||||
season: impl Into<i32>,
|
||||
season: impl Into<u32>,
|
||||
language: Option<&str>,
|
||||
) -> Result<Season, Error> {
|
||||
Ok(self
|
||||
|
||||
@@ -4,7 +4,7 @@ use chrono::NaiveDate;
|
||||
#[derive(Debug, Clone, serde::Deserialize)]
|
||||
pub struct Episode {
|
||||
/// The episode's number
|
||||
pub episode_number: i32,
|
||||
pub episode_number: u32,
|
||||
/// The episode's name
|
||||
pub name: String,
|
||||
/// The episode's overview
|
||||
|
||||
@@ -19,7 +19,7 @@ pub enum Movie {}
|
||||
pub enum Show {}
|
||||
|
||||
/// The inner type of TmdbId
|
||||
pub type Inner = i32;
|
||||
pub type Inner = u32;
|
||||
|
||||
/// Wraps an ID from TMDB, the generic parameter is to enforce that
|
||||
/// IDs for different types of media are not interchangeable
|
||||
|
||||
@@ -6,7 +6,7 @@ use super::Episode;
|
||||
#[derive(Debug, Clone, serde::Deserialize)]
|
||||
pub struct Season {
|
||||
/// The season's number
|
||||
pub season_number: i32,
|
||||
pub season_number: u32,
|
||||
/// The season's name
|
||||
pub name: String,
|
||||
/// The season's overview
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct Show {
|
||||
/// The show's last air date
|
||||
pub last_air_date: NaiveDate,
|
||||
/// The number of seasons in this show
|
||||
pub number_of_seasons: i32,
|
||||
pub number_of_seasons: u32,
|
||||
/// The show's status
|
||||
pub status: ShowStatus,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user