Crate tmdb_api

Source
Expand description

§Rust client for The Movie DB API

This is yet another client for TMDB, but it supports async functions.

§Installing

cargo add tmdb-api

§Usage

use tmdb_api::client::Client;
use tmdb_api::client::reqwest::Client as ReqwestClient;

#[tokio::main]
async fn main() {
    let secret = std::env::var("TMDB_TOKEN_V3").unwrap();
    let client = Client::<ReqwestClient>::new(secret);
    let res = client.search_tvshows("simpsons", &Default::default()).await.unwrap();
    let item = res.results.first().unwrap();
    println!("TVShow found: {}", item.inner.name);
}

§Features

§Running the tests

cargo test

If you want to run some integration tests, just export a TMDB_TOKEN_V3 environment variable and run

cargo test --features integration

Re-exports§

pub use client::Client;
pub use chrono;
pub use reqwest;

Modules§

certification
https://developer.themoviedb.org/reference/certification-movie-list https://developer.themoviedb.org/reference/certifications-tv-list
changes
client
collection
common
company
configuration
error
genre
https://developer.themoviedb.org/reference/genre-movie-list https://developer.themoviedb.org/reference/genre-tv-list
movie
people
tvshow
watch_provider

Type Aliases§

Result