The Movie Database
This is an async
wrapper around the TMDb API.
Usage
use Client;
async
Actions
Currently there are 3 actions available:
- Fetching by ID
- Searching by name and (optionally) year of release
- Finding by external ID (IMDb ID, TVDB ID)
Additionally, two media types are currently supported:
- Movies
- TV series
Fetching
If you know its ID, you can fetch a movie using that.
let movie = tmdb.movie_by_id.await.unwrap;
You can request some more data with the append to response feature.
let movie = tmdb.movie_by_id.await.unwrap;
Searching
You can search for movies and series by title
and year
.
let page = tmdb.movie_search.await.unwrap;
let movies = page.results;
If you require additional details that aren't returned by the search, you can search then fetch:
let page = tmdb.movie_search.await.unwrap;
let movie = tmdb.movie_by_id.await.unwrap;
Finding
Finding a movie with an external ID is currently supported with IMDB IDs and, for TV series, TVDB IDs.
let movie = tmdb.movie_by_imdb_id.await.unwrap;
Acknowledgements
- This library is forked from tmdb-rs
- The Movie Database (TMDb)