pub struct Tvdb<'a> {
pub key: String,
/* private fields */
}
Expand description
Main interface
Fields
key: String
Your API key from TheTVDB.com
Implementations
sourceimpl<'a> Tvdb<'a>
impl<'a> Tvdb<'a>
sourcepub fn new<S>(key: S) -> Tvdb<'a>where
S: Into<String>,
pub fn new<S>(key: S) -> Tvdb<'a>where
S: Into<String>,
Initalise API with the given API key. A key can be acquired via the API Key Registration page
sourcepub fn login(&self) -> TvdbResult<bool>
pub fn login(&self) -> TvdbResult<bool>
Authenticate with TheTVDB, storing the JWT token internally for use by other methods.
sourcepub fn set_http_client(&mut self, client: &'a dyn RequestClient)
pub fn set_http_client(&mut self, client: &'a dyn RequestClient)
Sets a custom client (implementation of RequestClient
) used to
perform HTTP requests
sourcepub fn search(
&self,
name: Option<&str>,
imdb_id: Option<&str>
) -> TvdbResult<SeriesSearchResult>
pub fn search(
&self,
name: Option<&str>,
imdb_id: Option<&str>
) -> TvdbResult<SeriesSearchResult>
Search for series by name or IMDB ID https://api.thetvdb.com/swagger#!/Search/get_search_series
sourcepub fn episode<E>(&self, id: E) -> TvdbResult<EpisodeRecordResult>where
E: Into<EpisodeId>,
pub fn episode<E>(&self, id: E) -> TvdbResult<EpisodeRecordResult>where
E: Into<EpisodeId>,
Full information about given episode https://api.thetvdb.com/swagger#!/Episodes/get_episodes_id
sourcepub fn series_episodes<S>(
&self,
id: S,
page: u32
) -> TvdbResult<SeriesEpisodesResult>where
S: Into<SeriesId>,
pub fn series_episodes<S>(
&self,
id: S,
page: u32
) -> TvdbResult<SeriesEpisodesResult>where
S: Into<SeriesId>,
All episodes for given series
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Tvdb<'a>
impl<'a> !Send for Tvdb<'a>
impl<'a> !Sync for Tvdb<'a>
impl<'a> Unpin for Tvdb<'a>
impl<'a> !UnwindSafe for Tvdb<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more