diff --git a/Cargo.lock b/Cargo.lock index e4eac6a..3c1801d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,7 +238,7 @@ dependencies = [ [[package]] name = "flix-tmdb" -version = "0.0.1" +version = "0.0.2" dependencies = [ "chrono", "reqwest", diff --git a/Cargo.toml b/Cargo.toml index 7b746d3..33645d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ strip = "debuginfo" [workspace.dependencies] flix = { path = "crates/flix", version = "=0.0.1", default-features = false } -flix-tmdb = { path = "crates/tmdb", version = "=0.0.1", default-features = false } +flix-tmdb = { path = "crates/tmdb", version = "=0.0.2", default-features = false } anyhow = { version = "^1", default-features = false } chrono = { version = "^0.4", default-features = false } diff --git a/crates/tmdb/Cargo.toml b/crates/tmdb/Cargo.toml index c6bc2c7..d936165 100644 --- a/crates/tmdb/Cargo.toml +++ b/crates/tmdb/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flix-tmdb" -version = "0.0.1" +version = "0.0.2" categories = [] description = "Clients and models for fetching data from TMDB" diff --git a/crates/tmdb/README.md b/crates/tmdb/README.md index c3e07ec..ca181e0 100644 --- a/crates/tmdb/README.md +++ b/crates/tmdb/README.md @@ -1,5 +1,5 @@ # flix -[![Crates Version](https://img.shields.io/crates/v/flix.svg)](https://crates.io/crates/flix) +[![Crates Version](https://img.shields.io/crates/v/flix-tmdb.svg)](https://crates.io/crates/flix-tmdb) A library providing clients and models for fetching data from TMDB diff --git a/crates/tmdb/src/model/id.rs b/crates/tmdb/src/model/id.rs index d820b40..b26b0b1 100644 --- a/crates/tmdb/src/model/id.rs +++ b/crates/tmdb/src/model/id.rs @@ -18,8 +18,11 @@ pub enum Collection {} pub enum Movie {} pub enum Show {} -type Inner = i32; +/// The inner type of TmdbId +pub type Inner = i32; +/// Wraps an ID from TMDB, the generic parameter is to enforce that +/// IDs for different types of media are not interchangeable #[derive(serde::Serialize, serde::Deserialize)] #[serde(transparent)] #[repr(transparent)] @@ -30,7 +33,8 @@ pub struct TmdbId { } impl TmdbId { - pub fn inner(&self) -> Inner { + /// Extract the inner value + pub fn inner(self) -> Inner { self.inner } } diff --git a/crates/tmdb/src/model/mod.rs b/crates/tmdb/src/model/mod.rs index f85a906..0391a21 100644 --- a/crates/tmdb/src/model/mod.rs +++ b/crates/tmdb/src/model/mod.rs @@ -15,3 +15,4 @@ pub use serde::*; pub use show::*; pub use id::{CollectionId, MovieGenreId, MovieId, ShowGenreId, ShowId}; +pub use id::{Inner as TmdbIdInner, TmdbId};