[][src]Struct trakt::sync::TraktApi

pub struct TraktApi { /* fields omitted */ }

The main struct which contains all requests

Methods

impl TraktApi[src]

pub fn oauth_authorize(
    &self,
    client_id: &str,
    redirect_uri: &str,
    state: Option<&str>
) -> Result<()>
[src]

pub fn oauth_get_token(
    &self,
    code: &str,
    redirect_uri: &str
) -> Result<AuthenticationTokenResponse>
[src]

pub fn oauth_refresh_token(
    &self,
    refresh_token: &str,
    redirect_uri: &str
) -> Result<AuthenticationTokenResponse>
[src]

pub fn oauth_revoke_token(&self, token: &str) -> Result<()>[src]

pub fn devices_authenticate(&self) -> Result<AuthenticationDevices>[src]

pub fn get_token(
    &self,
    device_code: &str
) -> Result<AuthenticationTokenResponse>
[src]

impl TraktApi[src]

pub fn calendar_all_shows(&self) -> CalendarRequest<CalendarShow>[src]

pub fn calendar_my_shows<'a>(
    &'a self,
    access_token: &'a str
) -> CalendarRequest<'a, CalendarShow>
[src]

pub fn calendar_all_new_shows(&self) -> CalendarRequest<CalendarShow>[src]

pub fn calendar_my_new_shows<'a>(
    &'a self,
    access_token: &'a str
) -> CalendarRequest<'a, CalendarShow>
[src]

pub fn calendar_all_season_premieres(&self) -> CalendarRequest<CalendarShow>[src]

pub fn calendar_my_season_premieres<'a>(
    &'a self,
    access_token: &'a str
) -> CalendarRequest<'a, CalendarShow>
[src]

pub fn calendar_all_movies(&self) -> CalendarRequest<CalendarMovie>[src]

pub fn calendar_my_movies<'a>(
    &'a self,
    access_token: &'a str
) -> CalendarRequest<'a, CalendarMovie>
[src]

pub fn calendar_all_dvd(&self) -> CalendarRequest<CalendarMovie>[src]

pub fn calendar_my_dvd<'a>(
    &'a self,
    access_token: &'a str
) -> CalendarRequest<'a, CalendarMovie>
[src]

impl TraktApi[src]

pub fn checkin(&self) -> Checkin[src]

pub fn checkout(&self, access_token: &str) -> Result<()>[src]

impl TraktApi[src]

pub fn comment_create<'a>(
    &'a self,
    comment: &'a str
) -> CommentCreateRequest<'a>
[src]

pub fn comment(&self, id: u32) -> Result<Comment>[src]

pub fn comment_update(
    &self,
    comment_id: u32,
    comment: String
) -> CommentPostRequest
[src]

pub fn comment_delete(&self, comment_id: u32, access_token: &str) -> Result<()>[src]

pub fn replies(&self, comment_id: u32) -> PaginationRequest<Comment>[src]

pub fn replies_post(
    &self,
    comment_id: u32,
    comment: String
) -> CommentPostRequest
[src]

pub fn comment_item(&self, comment_id: u32) -> Result<CommentItem>[src]

pub fn comment_likes(&self, comment_id: u32) -> PaginationRequest<Like>[src]

pub fn comment_like(&self, comment_id: u32, access_token: &str) -> Result<()>[src]

pub fn comment_like_delete(
    &self,
    comment_id: u32,
    access_token: &str
) -> Result<()>
[src]

pub fn comments_recent(&self) -> CommentsRequest<CommentAndItem>[src]

pub fn comments_updates(&self) -> CommentsRequest<CommentAndItem>[src]

impl TraktApi[src]

pub fn episode(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32
) -> Result<Episode>
[src]

pub fn episode_full(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32
) -> Result<FullEpisode>
[src]

pub fn episode_translations(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32,
    language: impl Display
) -> Result<Vec<Translation>>
[src]

pub fn episode_comments(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32
) -> PaginationRequest<Comment>
[src]

pub fn episode_lists(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32,
    f: impl FnOnce(ListFactory) -> ListFactory
) -> PaginationRequest<List>
[src]

pub fn episode_ratings(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32
) -> Result<Ratings>
[src]

pub fn episode_stats(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32
) -> Result<MediaStats>
[src]

pub fn episode_watching(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32
) -> Result<Vec<User>>
[src]

pub fn episode_watching_full(
    &self,
    show_id: impl Display,
    season_number: u32,
    episode_number: u32
) -> Result<Vec<FullUser>>
[src]

impl TraktApi[src]

impl TraktApi[src]

pub fn movies_played(&self, period: TimePeriod) -> MoviesRequest<WatchedMovie>[src]

pub fn movies_watched(&self, period: TimePeriod) -> MoviesRequest<WatchedMovie>[src]

pub fn movies_collected(
    &self,
    period: TimePeriod
) -> MoviesRequest<WatchedMovie>
[src]

pub fn movies_anticipated(&self) -> MoviesRequest<AnticipatedMovie>[src]

pub fn movies_updates(&self) -> PaginationRequest<UpdatedMovie>[src]

pub fn movie(&self, id: impl Display) -> Result<Movie>[src]

pub fn movie_aliases(&self, id: impl Display) -> Result<Vec<Alias>>[src]

pub fn movie_translations(
    &self,
    id: impl Display,
    language: impl Display
) -> Result<Vec<Translation>>
[src]

pub fn movie_comments(&self, id: impl Display) -> PaginationRequest<Comment>[src]

pub fn movie_lists(
    &self,
    id: impl Display,
    f: impl FnOnce(ListFactory) -> ListFactory
) -> PaginationRequest<List>
[src]

pub fn movie_people(&self, id: impl Display) -> Result<People>[src]

pub fn movie_ratings(&self, id: impl Display) -> Result<Ratings>[src]

pub fn movie_stats(&self, id: impl Display) -> Result<MediaStats>[src]

pub fn movie_watching(&self, id: impl Display) -> Result<Vec<User>>[src]

impl TraktApi[src]

pub fn people(&self, id: &str) -> Result<Person>[src]

pub fn people_movie_credits(&self, id: &str) -> Result<Credits>[src]

pub fn people_show_credits(&self, id: &str) -> Result<Credits>[src]

pub fn people_lists(
    &self,
    id: &str,
    f: impl FnOnce(ListFactory) -> ListFactory
) -> Result<Vec<List>>
[src]

impl TraktApi[src]

pub fn recommendations_movie(&self, access_token: &str) -> Result<Vec<Movie>>[src]

pub fn recommendations_movie_hide(
    &self,
    id: impl Display,
    access_token: &str
) -> Result<()>
[src]

pub fn recommendations_show(&self, access_token: &str) -> Result<Vec<Movie>>[src]

pub fn recommendations_show_hide(
    &self,
    id: impl Display,
    access_token: &str
) -> Result<()>
[src]

impl TraktApi[src]

pub fn search(
    &self,
    item_type: SearchType,
    query: &str
) -> PaginationRequest<SearchResult>
[src]

pub fn id_lookup(
    &self,
    id_type: IdType,
    id: impl Display,
    item_type: Option<SearchItemType>
) -> Result<Vec<SearchResult>>
[src]

impl TraktApi[src]

pub fn seasons(&self, show_id: impl Display) -> Result<Vec<Season>>[src]

pub fn season(
    &self,
    show_id: impl Display,
    season_number: u32
) -> Result<Vec<Episode>>
[src]

pub fn season_comments(
    &self,
    show_id: impl Display,
    season_number: u32
) -> Result<Vec<Comment>>
[src]

pub fn season_lists(
    &self,
    show_id: impl Display,
    season_number: u32,
    f: impl FnOnce(ListFactory) -> ListFactory
) -> Result<Vec<List>>
[src]

pub fn season_ratings(
    &self,
    show_id: impl Display,
    season_number: u32
) -> Result<Ratings>
[src]

pub fn season_stats(
    &self,
    show_id: impl Display,
    season_number: u32
) -> Result<MediaStats>
[src]

pub fn season_watching(
    &self,
    show_id: impl Display,
    season_number: u32
) -> Result<Vec<User>>
[src]

impl TraktApi[src]

pub fn shows_played(&self, period: TimePeriod) -> PaginationRequest<WatchedShow>[src]

pub fn shows_watched(
    &self,
    period: TimePeriod
) -> PaginationRequest<WatchedShow>
[src]

pub fn shows_collected(
    &self,
    period: TimePeriod
) -> PaginationRequest<WatchedShow>
[src]

pub fn shows_anticipated(&self) -> PaginationRequest<AnticipatedShow>[src]

pub fn shows_updates(&self) -> PaginationRequest<UpdatedShow>[src]

pub fn show(&self, id: impl Display) -> Result<Show>[src]

pub fn show_aliases(&self, id: impl Display) -> Result<Vec<Alias>>[src]

pub fn show_translations(
    &self,
    id: impl Display,
    language: impl Display
) -> Result<Vec<Translation>>
[src]

pub fn show_comments(&self, id: impl Display) -> PaginationRequest<Comment>[src]

pub fn show_lists(
    &self,
    id: impl Display,
    f: impl FnOnce(ListFactory) -> ListFactory
) -> PaginationRequest<List>
[src]

pub fn show_progress_collection(
    &self,
    id: impl Display,
    access_token: &str
) -> Result<CollectionProgress>
[src]

pub fn show_progress_watched(
    &self,
    id: impl Display,
    access_token: &str
) -> Result<WatchedProgress>
[src]

pub fn show_people(&self, id: impl Display) -> Result<People>[src]

pub fn show_ratings(&self, id: impl Display) -> Result<Ratings>[src]

pub fn show_stats(&self, id: impl Display) -> Result<MediaStats>[src]

pub fn show_watching(&self, id: impl Display) -> Result<Vec<User>>[src]

pub fn show_next_episode(&self, id: impl Display) -> Result<Option<Episode>>[src]

pub fn show_last_episode(&self, id: impl Display) -> Result<Option<Episode>>[src]

impl TraktApi[src]

pub fn sync_last_activities(&self, access_token: &str) -> Result<LastActivities>[src]

pub fn sync_playback(
    &self,
    item_type: WatchableType,
    access_token: &str
) -> Result<Vec<Playback>>
[src]

pub fn sync_playback_delete(
    &self,
    playback_id: u64,
    access_token: &str
) -> Result<()>
[src]

pub fn sync_collection_movie(
    &self,
    access_token: &str
) -> Result<Vec<CollectionMovie>>
[src]

pub fn sync_collection_show(
    &self,
    access_token: &str
) -> Result<Vec<CollectionShow>>
[src]

pub fn sync_collection_add(&self) -> SyncRequest<SyncAddResponse>[src]

pub fn sync_collection_remove(&self) -> SyncRequest<SyncRemoveResponse>[src]

pub fn sync_watched(
    &self,
    item_type: MediaType,
    access_token: &str
) -> Result<Vec<WatchedEntry>>
[src]

pub fn sync_history(
    &self,
    item_type: ItemType,
    start_at: DateTime<Utc>,
    end_at: DateTime<Utc>,
    access_token: &str
) -> PaginationRequest<HistoryItem>
[src]

pub fn sync_history_add(&self) -> SyncRequest<SyncAddResponse>[src]

pub fn sync_history_remove(&self) -> SyncRequest<SyncRemoveResponse>[src]

pub fn sync_ratings(
    &self,
    item_type: AllItemType,
    access_token: &str
) -> Result<Vec<Rating>>
[src]

pub fn sync_ratings_add(&self) -> SyncRequest<SyncAddResponse>[src]

pub fn sync_ratings_remove(&self) -> SyncRequest<SyncRemoveResponse>[src]

pub fn sync_watchlist(
    &self,
    item_type: Option<ItemType>,
    access_token: &str
) -> Result<Vec<ListItem>>
[src]

pub fn sync_watchlist_add(&self) -> SyncRequest<SyncAddResponse>[src]

pub fn sync_watchlist_remove(&self) -> SyncRequest<SyncRemoveResponse>[src]

impl TraktApi[src]

pub fn user_settings(&self, access_token: &str) -> Result<Settings>[src]

pub fn user_requests(&self, access_token: &str) -> Result<Vec<FollowRequest>>[src]

pub fn user_request_approve(
    &self,
    id: u32,
    access_token: &str
) -> Result<FollowRequestApprove>
[src]

pub fn user_request_deny(&self, id: u32, access_token: &str) -> Result<()>[src]

pub fn user_likes(
    &self,
    item_type: Option<LikeableType>,
    access_token: &str
) -> PaginationRequest<UserLike>
[src]

pub fn user_profile(
    &self,
    slug: &str,
    access_token: Option<&str>
) -> Result<User>
[src]

pub fn user_profile_full(
    &self,
    slug: &str,
    access_token: Option<&str>
) -> Result<FullUser>
[src]

pub fn user_collection_movies(
    &self,
    slug: &str,
    access_token: Option<&str>
) -> Result<Vec<CollectionMovie>>
[src]

pub fn user_collection_shows(
    &self,
    slug: &str,
    access_token: Option<&str>
) -> Result<Vec<CollectionShow>>
[src]

pub fn user_comments(
    &self,
    slug: &str,
    f: impl FnOnce(GetComments) -> GetComments,
    access_token: Option<&str>
) -> PaginationRequest<CommentAndItem>
[src]

impl TraktApi[src]

Generic functions and simple requests

pub fn new(client_id: String, client_secret: Option<String>) -> TraktApi[src]

Creates a new client client ID is needed client secret is optional if you need authorization

pub fn certifications(&self, ct: CertificationsType) -> Result<Certifications>[src]

Get a Vec of all certifications, including names, slugs, and descriptions. Trakt API

Errors

Returns Error::Response if the response contains an unsuccessful status code

Returns Error::Connection if the connection failed

Returns Error::Serde if the response could not be deserialized

pub fn countries(&self, media_type: MediaType) -> Result<Vec<Country>>[src]

Get a Vec of all countries, including names and codes. Trakt API

Errors

Returns Error::Response if the response contains an unsuccessful status code

Returns Error::Connection if the connection failed

Returns Error::Serde if the response could not be deserialized

pub fn genres(&self, media_type: MediaType) -> Result<Vec<Genre>>[src]

Get a Vec of all genres, including names and slugs. Trakt API

Errors

Returns Error::Response if the response contains an unsuccessful status code

Returns Error::Connection if the connection failed

Returns Error::Serde if the response could not be deserialized

pub fn languages(&self, media_type: MediaType) -> Result<Vec<Language>>[src]

Get a Vec of all languages, including names and codes. Trakt API

Errors

Returns Error::Response if the response contains an unsuccessful status code

Returns Error::Connection if the connection failed

Returns Error::Serde if the response could not be deserialized

pub fn networks(&self) -> Result<Vec<Network>>[src]

Get a Vec of all TV networks, including the name. Trakt API

Errors

Returns Error::Response if the response contains an unsuccessful status code

Returns Error::Connection if the connection failed

Returns Error::Serde if the response could not be deserialized

pub fn into_async(self) -> TraktApi[src]

Trait Implementations

impl PartialEq<TraktApi> for TraktApi[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for TraktApi[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for TraktApi[src]

Auto Trait Implementations

impl Send for TraktApi

impl Sync for TraktApi

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Erased for T