Struct Client

Source
pub struct Client<E> { /* private fields */ }
Expand description

HTTP client for TMDB

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

let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());

Implementations§

Source§

impl<E: Executor> Client<E>

Source

pub async fn list_movie_certifications(&self) -> Result<Response>

Get an up to date list of the officially supported movie certifications on TMDB

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movie_certifications().await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source

pub async fn list_tvshow_certifications(&self) -> Result<Response>

Get an up to date list of the officially supported tv show certifications on TMDB

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_tvshow_certifications().await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_movie_changes( &self, params: &Params, ) -> Result<PaginatedResult<Change>>

Get a list of all of the movie ids that have been changed in the past 24 hours.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movie_changes(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source

pub async fn list_person_changes( &self, params: &Params, ) -> Result<PaginatedResult<Change>>

Get a list of all of the person ids that have been changed in the past 24 hours.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_person_changes(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source

pub async fn list_tvshow_changes( &self, params: &Params, ) -> Result<PaginatedResult<Change>>

Get a list of all of the tvshow ids that have been changed in the past 24 hours.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_tvshow_changes(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub fn builder() -> ClientBuilder<E>

Source

pub fn new(api_key: String) -> Self

Source

pub fn base_url(&self) -> &str

Source

pub async fn execute<T: DeserializeOwned, P: Serialize>( &self, path: &str, params: &P, ) -> Result<T, Error>

Source§

impl<E: Executor> Client<E>

Source

pub async fn get_collection_details( &self, collection_id: u64, params: &Params<'_>, ) -> Result<CollectionDetails>

Source§

impl<E: Executor> Client<E>

Source

pub async fn get_company_alternative_names( &self, company_id: u64, ) -> Result<Response>

Command to get the company alternative names

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_company_alternative_names(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_company_details(&self, company_id: u64) -> Result<Company>

Command to get details of a company

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_company_details(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_company_images(&self, company_id: u64) -> Result<Response>

Get the company logos by id.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_company_images(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_movie_genres(&self, params: &Params<'_>) -> Result<Response>

List genres for movies

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movie_genres(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source

pub async fn list_tvshow_genres(&self, params: &Params<'_>) -> Result<Response>

List genres for tvshows

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_tvshow_genres(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_alternative_titles( &self, movie_id: u64, params: &Params<'_>, ) -> Result<Response>

Command to get alternative titles for a movie

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_alternative_titles(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_changes( &self, movie_id: u64, params: &Params, ) -> Result<Response>

List changes for a movie

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_changes(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_credits( &self, movie_id: u64, params: &Params<'_>, ) -> Result<GetMovieCreditsResponse>

List changes for a movie

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_credits(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_details( &self, movie_id: u64, params: &Params<'_>, ) -> Result<Movie>

Get movie details

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_details(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_external_ids( &self, movie_id: u64, ) -> Result<MovieExternalIds>

Get movie external ids

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_external_ids(42).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_images( &self, movie_id: u64, params: &Params<'_>, ) -> Result<GetMovieImagesResponse>

Get movie images

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_images(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_keywords(&self, movie_id: u64) -> Result<Response>

Get movie keywords

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_keywords(42).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_latest_movie(&self, params: &Params<'_>) -> Result<Movie>

Get latest movie

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_latest_movie(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_lists( &self, movie_id: u64, params: &Params<'_>, ) -> Result<PaginatedResult<MovieList>>

Get the lists that a movie has been added to.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_lists(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_movies_now_playing( &self, params: &Params<'_>, ) -> Result<ListMoviesNowPlayingResponse>

Get a list of movies in theatres. This is a release type query that looks for all movies that have a release type of 2 or 3 within the specified date range.

You can optionally specify a region parameter which will narrow the search to only look for theatrical release dates within the specified country.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movies_now_playing(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Get a list of the current popular movies on TMDB. This list updates daily.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_popular_movies(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_recommendations( &self, movie_id: u64, params: &Params<'_>, ) -> Result<PaginatedResult<MovieShort>>

Get a list of recommended movies for a movie.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_recommendations(1, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_release_dates(&self, movie_id: u64) -> Result<Response>

Get the release date along with the certification for a movie.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_release_dates(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_reviews( &self, movie_id: u64, params: &Params<'_>, ) -> Result<PaginatedResult<MovieReview>>

Get the release date along with the certification for a movie.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_reviews(1, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn search_movies<'a>( &self, query: impl Into<Cow<'a, str>>, params: &Params<'a>, ) -> Result<PaginatedResult<MovieShort>>

Search for movies by their original, translated and alternative titles.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.search_movies("die hard", &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_similar_movies( &self, movie_id: u64, params: &Params<'_>, ) -> Result<PaginatedResult<MovieShort>>

Command to get similar movies to a movie

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_similar_movies(1, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_movies_top_rated( &self, params: &Params<'_>, ) -> Result<PaginatedResult<MovieShort>>

Get a list of the current popular movies on TMDB. This list updates daily.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movies_top_rated(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_translations(&self, movie_id: u64) -> Result<Response>

Get a list of translations that have been created for a movie.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_translations(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_movies_upcoming( &self, params: &Params<'_>, ) -> Result<PaginatedResult<MovieShort>>

Get a list of upcoming movies in theatres. This is a release type query that looks for all movies that have a release type of 2 or 3 within the specified date range.

You can optionally specify a region parameter which will narrow the search to only look for theatrical release dates within the specified country.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movies_upcoming(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_videos( &self, movie_id: u64, params: &Params<'_>, ) -> Result<Response>

Get a list of translations that have been created for a movie.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_translations(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_movie_watch_providers(&self, movie_id: u64) -> Result<Response>

Get a list of watch providers for a movie.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_movie_watch_providers(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_person_details( &self, person_id: u64, params: &Params<'_>, ) -> Result<Person>

List watch providers for movies

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_person_details(1, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_aggregate_credits( &self, tvshow_id: u64, params: &Params<'_>, ) -> Result<TVShowAggregateCredits>

Get tvshow aggregate credits

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_aggregate_credits(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_content_ratings( &self, tvshow_id: u64, ) -> Result<Response>

Get tvshow content ratings

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_content_ratings(42).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_details( &self, tvshow_id: u64, params: &Params<'_>, ) -> Result<TVShow>

Get tvshow details

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_details(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_episode_details( &self, tvshow_id: u64, season_number: u64, episode_number: u64, params: &Params<'_>, ) -> Result<Episode>

Get tvshow episode complete details

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_details(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_images( &self, tvshow_id: u64, params: &Params<'_>, ) -> Result<GetTVshowImagesResponse>

Get tvshow images

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_images(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_keywords(&self, tvshow_id: u64) -> Result<Response>

Get tvshow keywords

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_keywords(42).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_latest_tvshow(&self, params: &Params<'_>) -> Result<TVShow>

Get the most newly created show. This is a live response and will continuously change.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_latest_tvshow(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Get a list of the current popular tvshows on TMDB. This list updates daily.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_popular_movies(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn search_tvshows<'a>( &self, query: impl Into<Cow<'a, str>>, params: &Params<'a>, ) -> Result<PaginatedResult<TVShowShort>>

Command to search for tvshows

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.search_tvshows("simpsons", &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_season_details( &self, tvshow_id: u64, season_number: u64, params: &Params<'_>, ) -> Result<Season>

Get tvshow season details

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_details(42, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_similar_tvshows( &self, tvshow_id: u64, params: &Params<'_>, ) -> Result<PaginatedResult<TVShowShort>>

Command to get similar tvshows

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_similar_tvshows(1, &Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn get_tvshow_watch_providers( &self, tvshow_id: u64, ) -> Result<Response>

Get a list of watch providers for a tvshow.

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.get_tvshow_watch_providers(1).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_movie_watch_providers( &self, params: &Params<'_>, ) -> Result<Results<Vec<WatchProviderDetail>>>

List watch providers for movies

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movie_watch_providers(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source

pub async fn list_tvshow_watch_providers( &self, params: &Params<'_>, ) -> Result<Results<Vec<WatchProviderDetail>>>

List watch providers for tvshows

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_movie_watch_providers(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_countries(&self, params: &Params<'_>) -> Result<Vec<Country>>

Get a list of all jobs

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_countries(&Default::default()).await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_jobs(&self) -> Result<Vec<Job>>

Get a list of all jobs

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_jobs().await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}
Source§

impl<E: Executor> Client<E>

Source

pub async fn list_languages(&self) -> Result<Vec<Language>>

Get a list of all languages

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

#[tokio::main]
async fn main() {
    let client = Client::<ReqwestClient>::new("this-is-my-secret-token".into());
    match client.list_languages().await {
        Ok(res) => println!("found: {:#?}", res),
        Err(err) => eprintln!("error: {:?}", err),
    };
}

Trait Implementations§

Source§

impl<E: Debug> Debug for Client<E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<E> Freeze for Client<E>
where E: Freeze,

§

impl<E> RefUnwindSafe for Client<E>
where E: RefUnwindSafe,

§

impl<E> Send for Client<E>
where E: Send,

§

impl<E> Sync for Client<E>
where E: Sync,

§

impl<E> Unpin for Client<E>
where E: Unpin,

§

impl<E> UnwindSafe for Client<E>
where E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T