[−][src]Struct trakt::sync::TraktApi
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]
&self,
client_id: &str,
redirect_uri: &str,
state: Option<&str>
) -> Result<()>
pub fn oauth_get_token(
&self,
code: &str,
redirect_uri: &str
) -> Result<AuthenticationTokenResponse>
[src]
&self,
code: &str,
redirect_uri: &str
) -> Result<AuthenticationTokenResponse>
pub fn oauth_refresh_token(
&self,
refresh_token: &str,
redirect_uri: &str
) -> Result<AuthenticationTokenResponse>
[src]
&self,
refresh_token: &str,
redirect_uri: &str
) -> Result<AuthenticationTokenResponse>
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]
&self,
device_code: &str
) -> Result<AuthenticationTokenResponse>
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]
&'a self,
access_token: &'a str
) -> CalendarRequest<'a, CalendarShow>
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]
&'a self,
access_token: &'a str
) -> CalendarRequest<'a, CalendarShow>
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]
&'a self,
access_token: &'a str
) -> CalendarRequest<'a, CalendarShow>
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]
&'a self,
access_token: &'a str
) -> CalendarRequest<'a, CalendarMovie>
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]
&'a self,
access_token: &'a str
) -> CalendarRequest<'a, CalendarMovie>
impl TraktApi
[src]
impl TraktApi
[src]
pub fn comment_create<'a>(
&'a self,
comment: &'a str
) -> CommentCreateRequest<'a>
[src]
&'a self,
comment: &'a str
) -> CommentCreateRequest<'a>
pub fn comment(&self, id: u32) -> Result<Comment>
[src]
pub fn comment_update(
&self,
comment_id: u32,
comment: String
) -> CommentPostRequest
[src]
&self,
comment_id: u32,
comment: String
) -> CommentPostRequest
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]
&self,
comment_id: u32,
comment: String
) -> CommentPostRequest
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]
&self,
comment_id: u32,
access_token: &str
) -> Result<()>
pub fn comments_trending(&self) -> CommentsRequest<CommentAndItem>
[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]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<Episode>
pub fn episode_full(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<FullEpisode>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<FullEpisode>
pub fn episode_translations(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32,
language: impl Display
) -> Result<Vec<Translation>>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32,
language: impl Display
) -> Result<Vec<Translation>>
pub fn episode_comments(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> PaginationRequest<Comment>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> PaginationRequest<Comment>
pub fn episode_lists(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32,
f: impl FnOnce(ListFactory) -> ListFactory
) -> PaginationRequest<List>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32,
f: impl FnOnce(ListFactory) -> ListFactory
) -> PaginationRequest<List>
pub fn episode_ratings(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<Ratings>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<Ratings>
pub fn episode_stats(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<MediaStats>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<MediaStats>
pub fn episode_watching(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<Vec<User>>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<Vec<User>>
pub fn episode_watching_full(
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<Vec<FullUser>>
[src]
&self,
show_id: impl Display,
season_number: u32,
episode_number: u32
) -> Result<Vec<FullUser>>
impl TraktApi
[src]
pub fn lists_trending(&self) -> PaginationRequest<ListInfo>
[src]
pub fn lists_popular(&self) -> PaginationRequest<ListInfo>
[src]
impl TraktApi
[src]
pub fn movies_trending(&self) -> MoviesRequest<MovieInfo>
[src]
pub fn movies_popular(&self) -> MoviesRequest<Movie>
[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]
&self,
period: TimePeriod
) -> MoviesRequest<WatchedMovie>
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]
&self,
id: impl Display,
language: impl Display
) -> Result<Vec<Translation>>
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]
&self,
id: impl Display,
f: impl FnOnce(ListFactory) -> ListFactory
) -> PaginationRequest<List>
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_related(&self, id: impl Display) -> PaginationRequest<Movie>
[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]
&self,
id: &str,
f: impl FnOnce(ListFactory) -> ListFactory
) -> Result<Vec<List>>
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]
&self,
id: impl Display,
access_token: &str
) -> Result<()>
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]
&self,
id: impl Display,
access_token: &str
) -> Result<()>
impl TraktApi
[src]
pub fn search(
&self,
item_type: SearchType,
query: &str
) -> PaginationRequest<SearchResult>
[src]
&self,
item_type: SearchType,
query: &str
) -> PaginationRequest<SearchResult>
pub fn id_lookup(
&self,
id_type: IdType,
id: impl Display,
item_type: Option<SearchItemType>
) -> Result<Vec<SearchResult>>
[src]
&self,
id_type: IdType,
id: impl Display,
item_type: Option<SearchItemType>
) -> Result<Vec<SearchResult>>
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]
&self,
show_id: impl Display,
season_number: u32
) -> Result<Vec<Episode>>
pub fn season_comments(
&self,
show_id: impl Display,
season_number: u32
) -> Result<Vec<Comment>>
[src]
&self,
show_id: impl Display,
season_number: u32
) -> Result<Vec<Comment>>
pub fn season_lists(
&self,
show_id: impl Display,
season_number: u32,
f: impl FnOnce(ListFactory) -> ListFactory
) -> Result<Vec<List>>
[src]
&self,
show_id: impl Display,
season_number: u32,
f: impl FnOnce(ListFactory) -> ListFactory
) -> Result<Vec<List>>
pub fn season_ratings(
&self,
show_id: impl Display,
season_number: u32
) -> Result<Ratings>
[src]
&self,
show_id: impl Display,
season_number: u32
) -> Result<Ratings>
pub fn season_stats(
&self,
show_id: impl Display,
season_number: u32
) -> Result<MediaStats>
[src]
&self,
show_id: impl Display,
season_number: u32
) -> Result<MediaStats>
pub fn season_watching(
&self,
show_id: impl Display,
season_number: u32
) -> Result<Vec<User>>
[src]
&self,
show_id: impl Display,
season_number: u32
) -> Result<Vec<User>>
impl TraktApi
[src]
pub fn shows_trending(&self) -> PaginationRequest<ShowInfo>
[src]
pub fn shows_popular(&self) -> PaginationRequest<Show>
[src]
pub fn shows_played(&self, period: TimePeriod) -> PaginationRequest<WatchedShow>
[src]
pub fn shows_watched(
&self,
period: TimePeriod
) -> PaginationRequest<WatchedShow>
[src]
&self,
period: TimePeriod
) -> PaginationRequest<WatchedShow>
pub fn shows_collected(
&self,
period: TimePeriod
) -> PaginationRequest<WatchedShow>
[src]
&self,
period: TimePeriod
) -> PaginationRequest<WatchedShow>
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]
&self,
id: impl Display,
language: impl Display
) -> Result<Vec<Translation>>
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]
&self,
id: impl Display,
f: impl FnOnce(ListFactory) -> ListFactory
) -> PaginationRequest<List>
pub fn show_progress_collection(
&self,
id: impl Display,
access_token: &str
) -> Result<CollectionProgress>
[src]
&self,
id: impl Display,
access_token: &str
) -> Result<CollectionProgress>
pub fn show_progress_watched(
&self,
id: impl Display,
access_token: &str
) -> Result<WatchedProgress>
[src]
&self,
id: impl Display,
access_token: &str
) -> Result<WatchedProgress>
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_related(&self, id: impl Display) -> PaginationRequest<Show>
[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]
&self,
item_type: WatchableType,
access_token: &str
) -> Result<Vec<Playback>>
pub fn sync_playback_delete(
&self,
playback_id: u64,
access_token: &str
) -> Result<()>
[src]
&self,
playback_id: u64,
access_token: &str
) -> Result<()>
pub fn sync_collection_movie(
&self,
access_token: &str
) -> Result<Vec<CollectionMovie>>
[src]
&self,
access_token: &str
) -> Result<Vec<CollectionMovie>>
pub fn sync_collection_show(
&self,
access_token: &str
) -> Result<Vec<CollectionShow>>
[src]
&self,
access_token: &str
) -> Result<Vec<CollectionShow>>
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]
&self,
item_type: MediaType,
access_token: &str
) -> Result<Vec<WatchedEntry>>
pub fn sync_history(
&self,
item_type: ItemType,
start_at: DateTime<Utc>,
end_at: DateTime<Utc>,
access_token: &str
) -> PaginationRequest<HistoryItem>
[src]
&self,
item_type: ItemType,
start_at: DateTime<Utc>,
end_at: DateTime<Utc>,
access_token: &str
) -> PaginationRequest<HistoryItem>
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]
&self,
item_type: AllItemType,
access_token: &str
) -> Result<Vec<Rating>>
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]
&self,
item_type: Option<ItemType>,
access_token: &str
) -> Result<Vec<ListItem>>
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]
&self,
id: u32,
access_token: &str
) -> Result<FollowRequestApprove>
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]
&self,
item_type: Option<LikeableType>,
access_token: &str
) -> PaginationRequest<UserLike>
pub fn user_profile(
&self,
slug: &str,
access_token: Option<&str>
) -> Result<User>
[src]
&self,
slug: &str,
access_token: Option<&str>
) -> Result<User>
pub fn user_profile_full(
&self,
slug: &str,
access_token: Option<&str>
) -> Result<FullUser>
[src]
&self,
slug: &str,
access_token: Option<&str>
) -> Result<FullUser>
pub fn user_collection_movies(
&self,
slug: &str,
access_token: Option<&str>
) -> Result<Vec<CollectionMovie>>
[src]
&self,
slug: &str,
access_token: Option<&str>
) -> Result<Vec<CollectionMovie>>
pub fn user_collection_shows(
&self,
slug: &str,
access_token: Option<&str>
) -> Result<Vec<CollectionShow>>
[src]
&self,
slug: &str,
access_token: Option<&str>
) -> Result<Vec<CollectionShow>>
pub fn user_comments(
&self,
slug: &str,
f: impl FnOnce(GetComments) -> GetComments,
access_token: Option<&str>
) -> PaginationRequest<CommentAndItem>
[src]
&self,
slug: &str,
f: impl FnOnce(GetComments) -> GetComments,
access_token: Option<&str>
) -> PaginationRequest<CommentAndItem>
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]
fn eq(&self, other: &TraktApi) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for TraktApi
[src]
fn clone(&self) -> 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
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.