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>
impl<E: Executor> Client<E>
Sourcepub async fn list_movie_certifications(&self) -> Result<Response>
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),
};
}Sourcepub async fn list_tvshow_certifications(&self) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_movie_changes(
&self,
params: &Params,
) -> Result<PaginatedResult<Change>>
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),
};
}Sourcepub async fn list_person_changes(
&self,
params: &Params,
) -> Result<PaginatedResult<Change>>
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),
};
}Sourcepub async fn list_tvshow_changes(
&self,
params: &Params,
) -> Result<PaginatedResult<Change>>
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>
impl<E: Executor> Client<E>
pub async fn get_collection_details( &self, collection_id: u64, params: &Params<'_>, ) -> Result<CollectionDetails>
Source§impl<E: Executor> Client<E>
impl<E: Executor> Client<E>
Sourcepub async fn get_company_alternative_names(
&self,
company_id: u64,
) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_company_details(&self, company_id: u64) -> Result<Company>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_company_images(&self, company_id: u64) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_movie_genres(&self, params: &Params<'_>) -> Result<Response>
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),
};
}Sourcepub async fn list_tvshow_genres(&self, params: &Params<'_>) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_alternative_titles(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_changes(
&self,
movie_id: u64,
params: &Params,
) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_credits(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<GetMovieCreditsResponse>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_details(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<Movie>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_external_ids(
&self,
movie_id: u64,
) -> Result<MovieExternalIds>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_images(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<GetMovieImagesResponse>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_keywords(&self, movie_id: u64) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_latest_movie(&self, params: &Params<'_>) -> Result<Movie>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_lists(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<PaginatedResult<MovieList>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_movies_now_playing(
&self,
params: &Params<'_>,
) -> Result<ListMoviesNowPlayingResponse>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_popular_movies(
&self,
params: &Params<'_>,
) -> Result<PaginatedResult<MovieShort>>
pub async fn list_popular_movies( &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_popular_movies(&Default::default()).await {
Ok(res) => println!("found: {:#?}", res),
Err(err) => eprintln!("error: {:?}", err),
};
}Source§impl<E: Executor> Client<E>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_recommendations(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<PaginatedResult<MovieShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_release_dates(&self, movie_id: u64) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_reviews(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<PaginatedResult<MovieReview>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn search_movies<'a>(
&self,
query: impl Into<Cow<'a, str>>,
params: &Params<'a>,
) -> Result<PaginatedResult<MovieShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_similar_movies(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<PaginatedResult<MovieShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_movies_top_rated(
&self,
params: &Params<'_>,
) -> Result<PaginatedResult<MovieShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_translations(&self, movie_id: u64) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_movies_upcoming(
&self,
params: &Params<'_>,
) -> Result<PaginatedResult<MovieShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_videos(
&self,
movie_id: u64,
params: &Params<'_>,
) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_movie_watch_providers(&self, movie_id: u64) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_person_details(
&self,
person_id: u64,
params: &Params<'_>,
) -> Result<Person>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_aggregate_credits(
&self,
tvshow_id: u64,
params: &Params<'_>,
) -> Result<TVShowAggregateCredits>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_content_ratings(
&self,
tvshow_id: u64,
) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_details(
&self,
tvshow_id: u64,
params: &Params<'_>,
) -> Result<TVShow>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_episode_details(
&self,
tvshow_id: u64,
season_number: u64,
episode_number: u64,
params: &Params<'_>,
) -> Result<Episode>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_images(
&self,
tvshow_id: u64,
params: &Params<'_>,
) -> Result<GetTVshowImagesResponse>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_keywords(&self, tvshow_id: u64) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_latest_tvshow(&self, params: &Params<'_>) -> Result<TVShow>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_popular_tvshows(
&self,
params: &Params<'_>,
) -> Result<PaginatedResult<TVShowShort>>
pub async fn list_popular_tvshows( &self, params: &Params<'_>, ) -> Result<PaginatedResult<TVShowShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn search_tvshows<'a>(
&self,
query: impl Into<Cow<'a, str>>,
params: &Params<'a>,
) -> Result<PaginatedResult<TVShowShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_season_details(
&self,
tvshow_id: u64,
season_number: u64,
params: &Params<'_>,
) -> Result<Season>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_similar_tvshows(
&self,
tvshow_id: u64,
params: &Params<'_>,
) -> Result<PaginatedResult<TVShowShort>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn get_tvshow_watch_providers(
&self,
tvshow_id: u64,
) -> Result<Response>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_movie_watch_providers(
&self,
params: &Params<'_>,
) -> Result<Results<Vec<WatchProviderDetail>>>
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),
};
}Sourcepub async fn list_tvshow_watch_providers(
&self,
params: &Params<'_>,
) -> Result<Results<Vec<WatchProviderDetail>>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_countries(&self, params: &Params<'_>) -> Result<Vec<Country>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_jobs(&self) -> Result<Vec<Job>>
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>
impl<E: Executor> Client<E>
Sourcepub async fn list_languages(&self) -> Result<Vec<Language>>
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),
};
}