TmdbPlus 0.5.0
dotnet add package TmdbPlus --version 0.5.0
NuGet\Install-Package TmdbPlus -Version 0.5.0
<PackageReference Include="TmdbPlus" Version="0.5.0" />
<PackageVersion Include="TmdbPlus" Version="0.5.0" />
<PackageReference Include="TmdbPlus" />
paket add TmdbPlus --version 0.5.0
#r "nuget: TmdbPlus, 0.5.0"
#:package TmdbPlus@0.5.0
#addin nuget:?package=TmdbPlus&version=0.5.0
#tool nuget:?package=TmdbPlus&version=0.5.0
TmdbPlus
Typed .NET wrapper for the TMDB API. Classes and interfaces provided for each request/response for easy mapping
dotnet add package TmdbPlus
Setup
services.AddTmdb(token);
Takes a read access token. Returns IHttpClientBuilder
services.AddTmdb(token).AddStandardResilienceHandler();
The client is stateless, sessions are a parameter
Append To Response
TMDB has an append_to_response param for combining requests into one.
Here, append_to_response is a [Flags] enum. Appended blocks come back as nullable properties, non-null when you asked for them:
var movie = await tmdb.Movies.GetAsync(550, MovieAppend.Credits | MovieAppend.Videos);
Console.WriteLine(movie.Title);
foreach (var cast in movie.Credits!.Cast)
Console.WriteLine($"{cast.Name} as {cast.Character}");
{MovieAppend}.All grabs everything.
Appendable endpoints:
| Endpoint | Enum |
|---|---|
Movies.GetAsync |
MovieAppend |
Tv.GetAsync |
TvSeriesAppend |
Tv.Seasons.GetAsync |
TvSeasonAppend |
Tv.Episodes.GetAsync |
TvEpisodeAppend |
People.GetAsync |
PersonAppend |
Good to know
- Every call has a generic twin:
tmdb.Tv.GetAsync<TmdbSeriesDetails>(1396, …)deserializes into any class implementingITvSeriesDetails<…> - Paging - TMDB only serves pages 1–500; past that it 400s with
status_code22 - Retry / throttling - add
.AddStandardResilienceHandler(). TMDB's limit is ~40 req/s and "could change at any time" - Rate limits - ~50 req/s and 20 connections per IP
Credits
Based on TMDbLib by Michael Bisbjerg, maintained by Jellyfin.
License
MIT.
This product uses the TMDB API but is not endorsed or certified by TMDB.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Http (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.