Expose TmdbId

This commit is contained in:
2025-05-03 18:08:39 -06:00
parent 90c7b9d654
commit 45b0a5e601
6 changed files with 11 additions and 6 deletions
Generated
+1 -1
View File
@@ -238,7 +238,7 @@ dependencies = [
[[package]]
name = "flix-tmdb"
version = "0.0.1"
version = "0.0.2"
dependencies = [
"chrono",
"reqwest",
+1 -1
View File
@@ -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 }
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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
+6 -2
View File
@@ -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<T> {
}
impl<T> TmdbId<T> {
pub fn inner(&self) -> Inner {
/// Extract the inner value
pub fn inner(self) -> Inner {
self.inner
}
}
+1
View File
@@ -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};