pub struct WatchProviderList {
pub media_type: MediaType,
pub watch_region: Option<String>,
pub language: Option<String>,
}Expand description
Command to get the details of a collection
use tmdb_api::prelude::Command;
use tmdb_api::Client;
use tmdb_api::client::reqwest::ReqwestExecutor;
use tmdb_api::watch_provider::list::WatchProviderList;
#[tokio::main]
async fn main() {
use tmdb_api::common::MediaType;
let client = Client::<ReqwestExecutor>::new("this-is-my-secret-token".into());
let cmd = WatchProviderList::new(MediaType::Tv);
let result = cmd.execute(&client).await;
match result {
Ok(res) => println!("found: {:#?}", res),
Err(err) => eprintln!("error: {:?}", err),
};
}Fields§
§media_type: MediaType§watch_region: Option<String>ISO 3166-1 alpha-2 value to filter the results for one country.
language: Option<String>ISO 639-1 value to display translated data for the fields that support it.
Implementations§
Source§impl WatchProviderList
impl WatchProviderList
pub fn new(media_type: MediaType) -> Self
pub fn with_watch_region(self, watch_region: String) -> Self
pub fn with_language(self, language: String) -> Self
Trait Implementations§
Source§impl Clone for WatchProviderList
impl Clone for WatchProviderList
Source§fn clone(&self) -> WatchProviderList
fn clone(&self) -> WatchProviderList
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Command for WatchProviderList
impl Command for WatchProviderList
Auto Trait Implementations§
impl Freeze for WatchProviderList
impl RefUnwindSafe for WatchProviderList
impl Send for WatchProviderList
impl Sync for WatchProviderList
impl Unpin for WatchProviderList
impl UnwindSafe for WatchProviderList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more