pub struct Client { /* private fields */ }Expand description
HTTP client for TMDB
use tmdb_api::Client;
let client = Client::new("this-is-my-secret-token".into());Implementations§
source§impl Client
impl Client
pub fn builder() -> ClientBuilder
pub fn new(api_key: String) -> Self
pub fn with_base_url(self, base_url: String) -> Self
👎Deprecated: Use client builder instead. This will get dropped in future versions.
pub fn base_url(&self) -> &str
pub async fn execute<T: DeserializeOwned>( &self, path: &str, params: Vec<(&str, Cow<'_, str>)> ) -> Result<T, Error>
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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