Expand description
§tmdb-rs
An async, fully-typed client for TMDB (the movie database), covering API v3 and v4.
The signature feature is compile-time append_to_response: each with_*
call fills one slot of the response type, so an appended payload is a plain
field rather than an Option:
let tmdb = tmdb_rs::Client::with_read_token(std::env::var("TMDB_READ_TOKEN").unwrap());
let movie = tmdb.movie(550).with_credits().with_similar().send().await?;
println!("{}", movie.name);
println!("{} cast members", movie.credits.cast.len());
println!("{} similar movies", movie.similar.results.len());
// movie.images is () — it wasn't requested, and the type says soModules§
- stream
stream streamfeature: drain a paginated endpoint as a stream of items
Structs§
- Access
Token v4 - a v4 user access token, from the v4 auth flow
- Account
Details - Account
Lists Request - builder for
GET /account/{account_id}/lists - Account
Request - builder for
GET /account - Account
States - Account
Watch Providers - the account’s watch provider preferences
- Account
Watch Providers Request - builder for
GET /account/watch/providers - Aggregate
Cast Member - Aggregate
Credits - credits rolled up across all episodes of a series
- Aggregate
Crew Member - Alternative
Name - Alternative
Title - Alternative
Titles /movieor/tvalternative_titles— movies wrap it intitles, series inresults- Author
Details - Avatar
- Backdrop
- an image path; call a size method for the full url
- Cast
Member - Certification
- Change
- Change
Item - Changes
- Client
- the entry point; clone freely, it shares one connection pool
- Collection
Details - a collection and its parts
- Collection
Details Request - builder for
GET /collection/{id}; eachwith_*fills one append slot - Collection
Images Request - builder for
GET /collection/{id}/images - Collection
Short - one collection in a search response
- Collection
Translations Request - builder for
GET /collection/{id}/translations - Company
Alternative Names Request - builder for
GET /company/{id}/alternative_names - Company
Details - Company
Images Request - builder for
GET /company/{id}/images - Company
Request - builder for
GET /company/{id} - Company
Short - one company in a search response
- Configuration
- the API-wide configuration: image base urls and sizes, change keys
- Configuration
Request - builder for
GET /configuration - Content
Rating - Content
Ratings - Countries
Request - builder for
GET /configuration/countries - Country
Info - Country
Providers - one country’s watch options for a title
- Country
Release Dates - Create
Guest Session Request - builder for
GET /authentication/guest_session/new - Create
List Request - builder for
POST /list - Create
List Response - the answer of a list creation
- Create
Session Request - builder for
POST /authentication/session/new - Credit
Details - a single credit by its credit id
- Credit
Episode - one episode credited on an episode-level credit
- Credit
Movie - the movie a credit points at
- Credit
Request - builder for
GET /credit/{id} - Credit
Season - one season credited on an episode-level credit
- Credit
Series - the series a credit points at
- Credits
- Crew
Member - Date
- Date in the proleptic Gregorian calendar.
- Delete
Session Request - builder for
DELETE /authentication/session - Department
Jobs - Discover
Movies Request - builder for
GET /discover/movie - Discover
TvRequest - builder for
GET /discover/tv - Episode
- one episode inside a season
- Episode
Account State - Episode
Account States - an episode’s own account state
- Episode
Details - one episode of a series
- Episode
Details Request - builder for
GET /tv/{id}/season/{season}/episode/{episode}; eachwith_*fills one append slot - Episode
Group - Episode
Group Entry - one group inside an episode group
- Episode
Group Short - Episode
Groups - External
Ids - Favorite
Movies Request - builder for
GET /account/{account_id}/favorite/movies - Favorite
TvRequest - builder for
GET /account/{account_id}/favorite/tv - Find
Request - builder for
GET /find/{external_id} - Find
Results - everything matching one external id
- Found
Episode - one episode found by external id
- Found
Season - one season found by external id
- Genre
- Guest
Session - Guest
Session Id - a v3 guest session id
- Image
- Image
Config - Images
- Item
Result v4 - per-item outcome of an items call
- Item
Status - the answer of
item_status - Items
Response v4 - Job
- one job in an aggregate credits entry
- Jobs
Request - builder for
GET /configuration/jobs - Keyword
- Keyword
Movies Request - builder for
GET /keyword/{id}/movies - Keyword
Request - builder for
GET /keyword/{id} - Language
Info - Languages
Request - builder for
GET /configuration/languages - List
AddItem Request - builder for
POST /list/{id}/add_item - List
Clear Request - builder for
POST /list/{id}/clear - List
Delete Request - builder for
DELETE /list/{id} - List
Details - a v3 list and its items
- List
Item v4 - one item in an add/remove/update items call
- List
Item Status Request - builder for
GET /list/{id}/item_status - List
Remove Item Request - builder for
POST /list/{id}/remove_item - List
Request - builder for
GET /list/{id} - List
Short - one list in a list-of-lists response
- Logo
- an image path; call a size method for the full url
- Mark
Favorite Request - builder for
POST /account/{account_id}/favorite - Movie
Account States Request - builder for
GET /movie/{id}/account_states - Movie
Alternative Titles Request - builder for
GET /movie/{id}/alternative_titles - Movie
Cast Credit - a movie acting credit in a person’s filmography
- Movie
Certifications Request - builder for
GET /certification/movie/list - Movie
Change - a movie touched by a change window
- Movie
Changes ById Request - builder for
GET /movie/{id}/changes - Movie
Changes Request - builder for
GET /movie/changes - Movie
Credits Request - builder for
GET /movie/{id}/credits - Movie
Crew Credit - a movie crew credit in a person’s filmography
- Movie
Details - the primary details of a movie
- Movie
Details Request - builder for
GET /movie/{id}; eachwith_*fills one append slot - Movie
External IdsRequest - builder for
GET /movie/{id}/external_ids - Movie
Genres Request - builder for
GET /genre/movie/list - Movie
Images Request - builder for
GET /movie/{id}/images - Movie
Keywords /movie/{id}/keywords- Movie
Keywords Request - builder for
GET /movie/{id}/keywords - Movie
Latest Request - builder for
GET /movie/latest - Movie
Lists Request - builder for
GET /movie/{id}/lists - Movie
NowPlaying Request - builder for
GET /movie/now_playing - Movie
Popular Request - builder for
GET /movie/popular - Movie
Recommendations Request - builder for
GET /movie/{id}/recommendations - Movie
Release Dates Request - builder for
GET /movie/{id}/release_dates - Movie
Reviews Request - builder for
GET /movie/{id}/reviews - Movie
Short - one movie in a list or search response
- Movie
Similar Request - builder for
GET /movie/{id}/similar - Movie
TopRated Request - builder for
GET /movie/top_rated - Movie
Translations Request - builder for
GET /movie/{id}/translations - Movie
Upcoming Request - builder for
GET /movie/upcoming - Movie
Videos Request - builder for
GET /movie/{id}/videos - Movie
Watch Provider List Request - builder for
GET /watch/providers/movie - Movie
Watch Providers Request - builder for
GET /movie/{id}/watch/providers - Network
Alternative Names Request - builder for
GET /network/{id}/alternative_names - Network
Details - Network
Images Request - builder for
GET /network/{id}/images - Network
Request - builder for
GET /network/{id} - Network
Short - one network on an episode group
- Next
Episode - a series’ next aired episode
- Page
- one page of a paginated list endpoint
- Person
Changes Request - builder for
GET /person/{id}/changes - Person
Combined Credits Request - builder for
GET /person/{id}/combined_credits - Person
Credits - a person’s filmography; combined, movie-only and tv-only share the shape
- Person
Details - the primary details of a person
- Person
Details Request - builder for
GET /person/{id}; eachwith_*fills one append slot - Person
External IdsRequest - builder for
GET /person/{id}/external_ids - Person
Images - Person
Images Request - builder for
GET /person/{id}/images - Person
Latest Request - builder for
GET /person/latest - Person
Movie Credits Request - builder for
GET /person/{id}/movie_credits - Person
Popular Request - builder for
GET /person/popular - Person
Short - one person in a list or search response
- Person
Translation - Person
Translation Data - Person
Translations - Person
Translations Request - builder for
GET /person/{id}/translations - Person
TvCredits Request - builder for
GET /person/{id}/tv_credits - Poster
- an image path; call a size method for the full url
- Primary
Translations Request - builder for
GET /configuration/primary_translations - Profile
- an image path; call a size method for the full url
- Provider
Region - Rate
Movie Request - builder for
POST /movie/{id}/rating - Rate
TvEpisode Request - builder for
POST /tv/{id}/season/{season}/episode/{episode}/rating - Rate
TvRequest - builder for
POST /tv/{id}/rating - Rated
Episode - one episode in the rated-episodes list
- Rated
Episodes Request - builder for
GET /account/{account_id}/rated/episodes - Rated
Movies Request - builder for
GET /account/{account_id}/rated/movies - Rated
TvRequest - builder for
GET /account/{account_id}/rated/tv - Release
Date - Release
Dates - Request
Token - Request
Token Request - builder for
GET /authentication/token/new - Review
- Review
Request - builder for
GET /review/{id} - Role
- one role in an aggregate credits entry
- Screened
Entry - one episode screened in theatres
- Screened
Theatrically - Search
Collections Request - builder for
GET /search/collection - Search
Companies Request - builder for
GET /search/company - Search
Keywords Request - builder for
GET /search/keyword - Search
Movies Request - builder for
GET /search/movie - Search
People Request - builder for
GET /search/person - Search
Request - builder for
GET /search/multi - Search
TvRequest - builder for
GET /search/tv - Season
Details - one season of a series, episodes included
- Season
Details Request - builder for
GET /tv/{id}/season/{season}; eachwith_*fills one append slot - Season
Short - one season inside a series’ details
- Session
- Session
Id - a v3 session id, from the authentication flow
- SetWatchlist
Request - builder for
POST /account/{account_id}/watchlist - Status
Response - the success envelope of write endpoints
- Still
- an image path; call a size method for the full url
- Timezone
- Timezones
Request - builder for
GET /configuration/timezones - Translation
- Translation
Data - movies fill
title, seriesname - Translations
- Trending
AllRequest - builder for
GET /trending/all/{window} - Trending
Movies Request - builder for
GET /trending/movie/{window} - Trending
People Request - builder for
GET /trending/person/{window} - Trending
TvRequest - builder for
GET /trending/tv/{window} - TvAccount
States Request - builder for
GET /tv/{id}/account_states - TvAggregate
Credits Request - builder for
GET /tv/{id}/aggregate_credits - TvAiring
Today Request - builder for
GET /tv/airing_today - TvAlternative
Titles Request - builder for
GET /tv/{id}/alternative_titles - TvCast
Credit - a series acting credit in a person’s filmography
- TvCertifications
Request - builder for
GET /certification/tv/list - TvChanges
ById Request - builder for
GET /tv/{id}/changes - TvContent
Ratings Request - builder for
GET /tv/{id}/content_ratings - TvCredits
Request - builder for
GET /tv/{id}/credits - TvCrew
Credit - a series crew credit in a person’s filmography
- TvDetails
- the primary details of a series
- TvDetails
Request - builder for
GET /tv/{id}; eachwith_*fills one append slot - TvEpisode
Account States Request - builder for
GET /tv/{id}/season/{season}/episode/{episode}/account_states - TvEpisode
Changes Request - builder for
GET /tv/episode/{id}/changes - TvEpisode
Credits Request - builder for
GET /tv/{id}/season/{season}/episode/{episode}/credits - TvEpisode
External IdsRequest - builder for
GET /tv/{id}/season/{season}/episode/{episode}/external_ids - TvEpisode
Group Request - builder for
GET /tv/episode_group/{id} - TvEpisode
Groups Request - builder for
GET /tv/{id}/episode_groups - TvEpisode
Images Request - builder for
GET /tv/{id}/season/{season}/episode/{episode}/images - TvEpisode
Translations Request - builder for
GET /tv/{id}/season/{season}/episode/{episode}/translations - TvEpisode
Videos Request - builder for
GET /tv/{id}/season/{season}/episode/{episode}/videos - TvExternal
IdsRequest - builder for
GET /tv/{id}/external_ids - TvGenres
Request - builder for
GET /genre/tv/list - TvImages
Request - builder for
GET /tv/{id}/images - TvKeywords
/tv/{id}/keywords— same payload, different envelope- TvKeywords
Request - builder for
GET /tv/{id}/keywords - TvLatest
Request - builder for
GET /tv/latest - TvLists
Request - builder for
GET /tv/{id}/lists - TvOn
TheAir Request - builder for
GET /tv/on_the_air - TvPopular
Request - builder for
GET /tv/popular - TvRecommendations
Request - builder for
GET /tv/{id}/recommendations - TvReviews
Request - builder for
GET /tv/{id}/reviews - TvScreened
Theatrically Request - builder for
GET /tv/{id}/screened_theatrically - TvSeason
Account States Request - builder for
GET /tv/{id}/season/{season}/account_states - TvSeason
Aggregate Credits Request - builder for
GET /tv/{id}/season/{season}/aggregate_credits - TvSeason
Changes Request - builder for
GET /tv/season/{id}/changes - TvSeason
Credits Request - builder for
GET /tv/{id}/season/{season}/credits - TvSeason
External IdsRequest - builder for
GET /tv/{id}/season/{season}/external_ids - TvSeason
Images Request - builder for
GET /tv/{id}/season/{season}/images - TvSeason
Translations Request - builder for
GET /tv/{id}/season/{season}/translations - TvSeason
Videos Request - builder for
GET /tv/{id}/season/{season}/videos - TvSeason
Watch Providers Request - builder for
GET /tv/{id}/season/{season}/watch/providers - TvShort
- one series in a list or search response
- TvSimilar
Request - builder for
GET /tv/{id}/similar - TvTop
Rated Request - builder for
GET /tv/top_rated - TvTranslations
Request - builder for
GET /tv/{id}/translations - TvVideos
Request - builder for
GET /tv/{id}/videos - TvWatch
Provider List Request - builder for
GET /watch/providers/tv - TvWatch
Providers Request - builder for
GET /tv/{id}/watch/providers - Unrate
Movie Request - builder for
DELETE /movie/{id}/rating - Unrate
TvEpisode Request - builder for
DELETE /tv/{id}/season/{season}/episode/{episode}/rating - Unrate
TvRequest - builder for
DELETE /tv/{id}/rating - V4
v4 - the v4 api surface; get one from
Client::v4 - V4Access
Token v4 - step 2’s answer: the user access token every other v4 call needs
- V4Access
Token Request v4 - builder for
POST /auth/access_token - V4Account
Lists Request v4 - builder for
GET /account/{account_id}/lists - V4Create
List Request v4 - builder for
POST /list - V4Create
List Response v4 - the answer of a v4 list creation
- V4Delete
Access Token Request v4 - builder for
DELETE /auth/access_token - V4Delete
List Request v4 - builder for
DELETE /list/{id} - V4Favorite
Movies Request v4 - builder for
GET /account/{account_id}/movie/favorites - V4Favorite
TvRequest v4 - builder for
GET /account/{account_id}/tv/favorites - V4List
v4 - a v4 list and one page of its items
- V4List
AddItems Request v4 - builder for
POST /list/{id}/items - V4List
Clear Request v4 - builder for
GET /list/{id}/clear - V4List
Remove Items Request v4 - builder for
DELETE /list/{id}/items - V4List
Request v4 - builder for
GET /list/{id} - V4Mark
Favorite Request v4 - builder for
POST /account/{account_id}/favorites - V4Movie
Recommendations Request v4 - builder for
GET /account/{account_id}/movie/recommendations - V4Rated
Movies Request v4 - builder for
GET /account/{account_id}/movie/rated - V4Rated
TvRequest v4 - builder for
GET /account/{account_id}/tv/rated - V4Request
Token v4 - step 1’s answer: the request token to send the user to approve
- V4Request
Token Request v4 - builder for
POST /auth/request_token - V4Set
Watchlist Request v4 - builder for
POST /account/{account_id}/watchlist - V4Tv
Recommendations Request v4 - builder for
GET /account/{account_id}/tv/recommendations - V4Update
List Request v4 - builder for
PUT /list/{id} - V4Watchlist
Movies Request v4 - builder for
GET /account/{account_id}/movie/watchlist - V4Watchlist
TvRequest v4 - builder for
GET /account/{account_id}/tv/watchlist - Validate
KeyRequest - builder for
GET /authentication - Validate
With Login Request - builder for
POST /authentication/token/validate_with_login - Video
- Videos
- Watch
Provider - Watch
Provider Regions Request - builder for
GET /watch/providers/regions - Watch
Providers - the
watch/providerspayload, keyed by country code - Watchlist
Movies Request - builder for
GET /account/{account_id}/watchlist/movies - Watchlist
TvRequest - builder for
GET /account/{account_id}/watchlist/tv
Enums§
- Account
Sort - the sort order of account lists
- Cast
Credit - one acting credit, discriminated by TMDB’s
media_type - Country
Code - An enumeration of all ISO-3166-1 country codes
- Credit
Media - the movie or series a credit points at, discriminated by TMDB’s
media_type - Credit
Type - cast (on screen) or crew (behind it)
- Crew
Credit - one crew credit, discriminated by TMDB’s
media_type - Error
- every failure the client can produce
- External
Source - the database an external id comes from
- Language
- List
Type - the kind of items a v3 list holds
- Media
Type - movie or series, for write-endpoint bodies
- Movie
Sort - the movie discover sort orders
- Multi
Result - one multi-search hit, discriminated by TMDB’s
media_type - Rated
ratedisfalseuntil the user rates the title, then an object- Release
Type - TMDB’s release date kinds
- Time
Window - the trending time window
- TvSort
- the series discover sort orders
- V4Sort
v4 - the v4 list sort orders
Traits§
- Append
- one append_to_response slot in a detail response:
()when the payload was not requested, the payload type when it was - ToParam
- a query param value; slices join with commas, as TMDB expects
Type Aliases§
- Certifications
- certifications by country code
- Result