Documentation
¶
Overview ¶
Package internal used for client and services
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal abc ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services ¶
Package internal used for client and services
Index ¶
- Constants
- type AbuseRateLimitError
- type BadRequestError
- type CalendarsService
- func (c *CalendarsService) GetDVDReleases(ctx context.Context, actionType *string, startDate *string, days *int, ...) ([]*str.CalendarList, *str.Response, error)
- func (c *CalendarsService) GetFinales(ctx context.Context, actionType *string, startDate *string, days *int, ...) ([]*str.CalendarList, *str.Response, error)
- func (c *CalendarsService) GetMovies(ctx context.Context, actionType *string, startDate *string, days *int, ...) ([]*str.CalendarList, *str.Response, error)
- func (c *CalendarsService) GetNewShows(ctx context.Context, actionType *string, startDate *string, days *int, ...) ([]*str.CalendarList, *str.Response, error)
- func (c *CalendarsService) GetSeasonPremieres(ctx context.Context, actionType *string, startDate *string, days *int, ...) ([]*str.CalendarList, *str.Response, error)
- func (c *CalendarsService) GetShows(ctx context.Context, actionType *string, startDate *string, days *int, ...) ([]*str.CalendarList, *str.Response, error)
- type CertificationsService
- type CheckinService
- type Client
- func (c *Client) AdjustTimestamps(val reflect.Value, loc *time.Location)
- func (c *Client) BareDo(ctx context.Context, req *http.Request) (*str.Response, error)
- func (*Client) BuildCtxFromOptions(options *str.Options) context.Context
- func (c *Client) CheckResponse(r *http.Response) error
- func (c *Client) CheckRetryAfter(req *http.Request) *AbuseRateLimitError
- func (c *Client) Do(ctx context.Context, req *http.Request, v any) (*str.Response, error)
- func (c *Client) GetHeaders() map[string]any
- func (*Client) GetTimezone(ctx context.Context) *time.Location
- func (*Client) HavePages(page int, resp *str.Response, limit int) bool
- func (c *Client) NewRequest(method, urlStr string, body any, opts ...RequestOption) (*http.Request, error)
- func (c *Client) NewResponse(r *http.Response) *str.Response
- func (*Client) ParseRate(r *http.Response) str.Rate
- func (*Client) ParseRateLimit(r *http.Response) *time.Duration
- func (*Client) ParseUpgradeUser(r *http.Response) *url.URL
- func (c *Client) UpdateHeaders(headers map[string]any)
- func (*Client) WithContext(ctx context.Context, req *http.Request) *http.Request
- type CommentsService
- func (c *CommentsService) DeleteComment(ctx context.Context, id *int) (*str.Response, error)
- func (c *CommentsService) GetComment(ctx context.Context, id *int) (*str.Comment, *str.Response, error)
- func (c *CommentsService) GetCommentItem(ctx context.Context, id *int, opts *uri.ListOptions) (*str.CommentMediaItem, *str.Response, error)
- func (c *CommentsService) GetCommentUserLikes(ctx context.Context, id *int, opts *uri.ListOptions) ([]*str.CommentUserLike, *str.Response, error)
- func (c *CommentsService) GetRecentComments(ctx context.Context, contentType *string, strType *string, ...) ([]*str.CommentItem, *str.Response, error)
- func (c *CommentsService) GetRepliesForComment(ctx context.Context, opts *uri.ListOptions, id *int) ([]*str.Comment, *str.Response, error)
- func (c *CommentsService) GetTrendingComments(ctx context.Context, contentType *string, strType *string, ...) ([]*str.CommentItem, *str.Response, error)
- func (c *CommentsService) GetUpdatedComments(ctx context.Context, contentType *string, strType *string, ...) ([]*str.CommentItem, *str.Response, error)
- func (c *CommentsService) LikeComment(ctx context.Context, id *int) (*str.Response, error)
- func (c *CommentsService) PostAComment(ctx context.Context, comment *str.Comment) (*str.Comment, *str.Response, error)
- func (c *CommentsService) RemoveLikeComment(ctx context.Context, id *int) (*str.Response, error)
- func (c *CommentsService) ReplyAComment(ctx context.Context, id *int, reply *str.Comment) (*str.Comment, *str.Response, error)
- func (c *CommentsService) UpdateComment(ctx context.Context, id *int, comment *str.Comment) (*str.Comment, *str.Response, error)
- type ConflictError
- type CountriesService
- type EpisodesService
- type ForbiddenError
- type GenresService
- type InvalidUserError
- type LanguagesService
- type ListsService
- func (l *ListsService) GetAllUsersWhoLikedList(ctx context.Context, opts *uri.ListOptions, id *string) ([]*str.UserLike, *str.Response, error)
- func (l *ListsService) GetList(ctx context.Context, id *string) (*str.PersonalList, *str.Response, error)
- func (l *ListsService) GetListComments(ctx context.Context, id *string, sort *string, opts *uri.ListOptions) ([]*str.ListComment, *str.Response, error)
- func (l *ListsService) GetListItems(ctx context.Context, id *string, t *string, opts *uri.ListOptions) ([]*str.UserListItem, *str.Response, error)
- func (l *ListsService) GetPopularLists(ctx context.Context, opts *uri.ListOptions) ([]*str.List, *str.Response, error)
- func (l *ListsService) GetTrendingLists(ctx context.Context, opts *uri.ListOptions) ([]*str.List, *str.Response, error)
- func (l *ListsService) LikeList(ctx context.Context, id *string) (*str.Response, error)
- func (l *ListsService) RemoveLikeList(ctx context.Context, id *string) (*str.Response, error)
- type MoviesService
- func (m *MoviesService) GetAllMovieAliases(ctx context.Context, id *string) ([]*str.Alias, *str.Response, error)
- func (m *MoviesService) GetAllMovieComments(ctx context.Context, id *string, sort *string, opts *uri.ListOptions) ([]*str.Comment, *str.Response, error)
- func (m *MoviesService) GetAllMovieReleases(ctx context.Context, id *string, country *string) ([]*str.Release, *str.Response, error)
- func (m *MoviesService) GetAllMovieTranslations(ctx context.Context, id *string, language *string) ([]*str.Translation, *str.Response, error)
- func (m *MoviesService) GetAllPeopleForMovie(ctx context.Context, id *string, opts *uri.ListOptions) (*str.MoviePeople, *str.Response, error)
- func (m *MoviesService) GetAnticipatedMovies(ctx context.Context, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) GetBoxoffice(ctx context.Context, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) GetCollectedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) GetFavoritedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) GetListsContainingMovie(ctx context.Context, id *string, t *string, sort *string, ...) ([]*str.PersonalList, *str.Response, error)
- func (m *MoviesService) GetMovie(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Movie, *str.Response, error)
- func (m *MoviesService) GetMovieRatings(ctx context.Context, id *string) (*str.MovieRatings, *str.Response, error)
- func (m *MoviesService) GetMovieStats(ctx context.Context, id *string) (*str.MovieStats, *str.Response, error)
- func (m *MoviesService) GetMovieStudios(ctx context.Context, id *string) ([]*str.Studio, *str.Response, error)
- func (m *MoviesService) GetMovieVideos(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Video, *str.Response, error)
- func (m *MoviesService) GetMovieWatching(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.UserProfile, *str.Response, error)
- func (m *MoviesService) GetPlayedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) GetPopularMovies(ctx context.Context, opts *uri.ListOptions) ([]*str.Movie, *str.Response, error)
- func (m *MoviesService) GetRecentlyUpdatedMovies(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) GetRecentlyUpdatedMoviesTraktIDs(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*int, *str.Response, error)
- func (m *MoviesService) GetRelatedMovies(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Movie, *str.Response, error)
- func (m *MoviesService) GetTrendingMovies(ctx context.Context, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) GetWatchedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
- func (m *MoviesService) RefreshMovieMetadata(ctx context.Context, id *string) (*str.Response, error)
- type NetworksService
- type NotFoundError
- type NotesService
- func (n *NotesService) AddNotes(ctx context.Context, notes *str.Notes) (*str.Notes, *str.Response, error)
- func (n *NotesService) DeleteNotes(ctx context.Context, id *string) (*str.Response, error)
- func (n *NotesService) GetNotes(ctx context.Context, id *string) (*str.Notes, *str.Response, error)
- func (n *NotesService) GetNotesItem(ctx context.Context, id *string) (*str.NotesItem, *str.Response, error)
- func (n *NotesService) UpdateNotes(ctx context.Context, id *string, notes *str.Notes) (*str.Notes, *str.Response, error)
- type OauthService
- func (o *OauthService) ExchangeRefreshTokenForAccessToken(ctx context.Context, deviceToken *str.CurrentDeviceToken) (*str.DeviceToken, *str.Response, error)
- func (o *OauthService) GenerateNewDeviceCodes(ctx context.Context, code *str.NewDeviceCode) (*str.DeviceCode, *str.Response, error)
- func (o *OauthService) PoolForTheAccessToken(ctx context.Context, deviceToken *str.NewDeviceToken) (*str.DeviceToken, *str.Response, error)
- type PeopleService
- func (p *PeopleService) GetAllPeopleForShow(ctx context.Context, id *string, opts *uri.ListOptions) (*str.ShowPeople, *str.Response, error)
- func (p *PeopleService) GetListsContainingThisPerson(ctx context.Context, id *string, typeString *string, sort *string, ...) ([]*str.PersonalList, *str.Response, error)
- func (p *PeopleService) GetMovieCredits(ctx context.Context, id *string, opts *uri.ListOptions) (*str.PersonMovies, *str.Response, error)
- func (p *PeopleService) GetRecentlyUpdatedPeople(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*str.PersonItem, *str.Response, error)
- func (p *PeopleService) GetRecentlyUpdatedPeopleTraktIDs(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*int, *str.Response, error)
- func (p *PeopleService) GetShowCredits(ctx context.Context, id *string, opts *uri.ListOptions) (*str.PersonShows, *str.Response, error)
- func (p *PeopleService) GetSinglePerson(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Person, *str.Response, error)
- func (p *PeopleService) RefreshPersonMetadata(ctx context.Context, id *string) (*str.Response, error)
- type PreconditionFailedRequestError
- type RecommendationsService
- func (m *RecommendationsService) GetMovieRecommendations(ctx context.Context, opts *uri.ListOptions) ([]*str.Recommendation, *str.Response, error)
- func (m *RecommendationsService) GetShowRecommendations(ctx context.Context, opts *uri.ListOptions) ([]*str.Recommendation, *str.Response, error)
- func (m *RecommendationsService) HideMovieRecommendation(ctx context.Context, id *string) (*str.Response, error)
- func (m *RecommendationsService) HideShowRecommendation(ctx context.Context, id *string) (*str.Response, error)
- type RequestOption
- type ScrobbleService
- func (s *ScrobbleService) PauseScrobble(ctx context.Context, scrobble *str.Scrobble) (*str.Scrobble, *str.Response, error)
- func (s *ScrobbleService) StartScrobble(ctx context.Context, scrobble *str.Scrobble) (*str.Scrobble, *str.Response, error)
- func (s *ScrobbleService) StopScrobble(ctx context.Context, scrobble *str.Scrobble) (*str.Scrobble, *str.Response, error)
- type SearchService
- func (s *SearchService) GetIDLookupResults(ctx context.Context, formatType *string, id *string, opts *uri.ListOptions) ([]*str.SearchListItem, *str.Response, error)
- func (s *SearchService) GetTextQueryResults(ctx context.Context, searchType *string, opts *uri.ListOptions) ([]*str.SearchListItem, *str.Response, error)
- type SeasonsService
- type ServerError
- type Service
- type SetupData
- type ShowsService
- func (s *ShowsService) GetAllEpisodeComments(ctx context.Context, id *string, season *int, episode *int, sort *string, ...) ([]*str.Comment, *str.Response, error)
- func (s *ShowsService) GetAllEpisodeTranslations(ctx context.Context, id *string, season *int, episode *int, language *string) ([]*str.Translation, *str.Response, error)
- func (s *ShowsService) GetAllEpisodesForSingleSeason(ctx context.Context, id *string, season *int, opts *uri.ListOptions) ([]*str.Episode, *str.Response, error)
- func (s *ShowsService) GetAllPeopleForEpisode(ctx context.Context, id *string, season *int, episode *int, ...) (*str.EpisodePeople, *str.Response, error)
- func (s *ShowsService) GetAllPeopleForSeason(ctx context.Context, id *string, season *int, opts *uri.ListOptions) (*str.SeasonPeople, *str.Response, error)
- func (s *ShowsService) GetAllSeasonComments(ctx context.Context, id *string, season *int, sort *string, ...) ([]*str.Comment, *str.Response, error)
- func (s *ShowsService) GetAllSeasonTranslations(ctx context.Context, id *string, season *int, language *string, ...) ([]*str.Translation, *str.Response, error)
- func (s *ShowsService) GetAllSeasonsForShow(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Season, *str.Response, error)
- func (s *ShowsService) GetAllShowAliases(ctx context.Context, id *string) ([]*str.Alias, *str.Response, error)
- func (s *ShowsService) GetAllShowCertifications(ctx context.Context, id *string) ([]*str.Certification, *str.Response, error)
- func (s *ShowsService) GetAllShowComments(ctx context.Context, id *string, sort *string, opts *uri.ListOptions) ([]*str.Comment, *str.Response, error)
- func (s *ShowsService) GetAllShowTranslations(ctx context.Context, id *string, language *string) ([]*str.Translation, *str.Response, error)
- func (s *ShowsService) GetAnticipatedShows(ctx context.Context, opts *uri.ListOptions) ([]*str.ShowsItem, *str.Response, error)
- func (s *ShowsService) GetCollectedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
- func (s *ShowsService) GetEpisodeRatings(ctx context.Context, id *string, season *int, episode *int) (*str.EpisodeRatings, *str.Response, error)
- func (s *ShowsService) GetEpisodeStats(ctx context.Context, id *string, season *int, episode *int) (*str.EpisodeStats, *str.Response, error)
- func (s *ShowsService) GetEpisodeVideos(ctx context.Context, id *string, season *int, episode *int, ...) ([]*str.Video, *str.Response, error)
- func (s *ShowsService) GetEpisodesWatching(ctx context.Context, id *string, season *int, episode *int, ...) ([]*str.UserProfile, *str.Response, error)
- func (s *ShowsService) GetFavoritedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
- func (s *ShowsService) GetLastEpisode(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Episode, *str.Response, error)
- func (s *ShowsService) GetListsContainingEpisode(ctx context.Context, id *string, season *int, episode *int, t *string, ...) ([]*str.PersonalList, *str.Response, error)
- func (s *ShowsService) GetListsContainingSeason(ctx context.Context, id *string, season *int, t *string, sort *string, ...) ([]*str.PersonalList, *str.Response, error)
- func (s *ShowsService) GetListsContainingShow(ctx context.Context, id *string, t *string, sort *string, ...) ([]*str.PersonalList, *str.Response, error)
- func (s *ShowsService) GetNextEpisode(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Episode, *str.Response, error)
- func (s *ShowsService) GetPlayedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
- func (s *ShowsService) GetPopularShows(ctx context.Context, opts *uri.ListOptions) ([]*str.Show, *str.Response, error)
- func (s *ShowsService) GetRecentlyUpdatedShows(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*str.ShowsItem, *str.Response, error)
- func (s *ShowsService) GetRecentlyUpdatedShowsTraktIDs(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*int, *str.Response, error)
- func (s *ShowsService) GetRelatedShows(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Show, *str.Response, error)
- func (s *ShowsService) GetSeasonRatings(ctx context.Context, id *string, season *int) (*str.SeasonRatings, *str.Response, error)
- func (s *ShowsService) GetSeasonStats(ctx context.Context, id *string, season *int) (*str.SeasonStats, *str.Response, error)
- func (s *ShowsService) GetSeasonsVideos(ctx context.Context, id *string, season *int, opts *uri.ListOptions) ([]*str.Video, *str.Response, error)
- func (s *ShowsService) GetSeasonsWatching(ctx context.Context, id *string, season *int, opts *uri.ListOptions) ([]*str.UserProfile, *str.Response, error)
- func (s *ShowsService) GetShow(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Show, *str.Response, error)
- func (s *ShowsService) GetShowCollectionProgress(ctx context.Context, id *string, opts *uri.ListOptions) (*str.CollectionProgress, error)
- func (s *ShowsService) GetShowRatings(ctx context.Context, id *string) (*str.ShowRatings, *str.Response, error)
- func (s *ShowsService) GetShowStats(ctx context.Context, id *string) (*str.ShowStats, *str.Response, error)
- func (s *ShowsService) GetShowStudios(ctx context.Context, id *string) ([]*str.Studio, *str.Response, error)
- func (s *ShowsService) GetShowVideos(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Video, *str.Response, error)
- func (s *ShowsService) GetShowWatchedProgress(ctx context.Context, id *string, opts *uri.ListOptions) (*str.WatchedProgress, error)
- func (s *ShowsService) GetShowWatching(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.UserProfile, *str.Response, error)
- func (s *ShowsService) GetSingleEpisodeForShow(ctx context.Context, id *string, season *int, episode *int, ...) (*str.Episode, *str.Response, error)
- func (s *ShowsService) GetSingleSeasonsForShow(ctx context.Context, id *string, season *int, opts *uri.ListOptions) (*str.Season, *str.Response, error)
- func (s *ShowsService) GetTrendingShows(ctx context.Context, opts *uri.ListOptions) ([]*str.ShowsItem, *str.Response, error)
- func (s *ShowsService) GetWatchedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
- func (s *ShowsService) RefreshShowMetadata(ctx context.Context, id *string) (*str.Response, error)
- func (s *ShowsService) ResetShowProgress(ctx context.Context, id *string, progress *str.WatchedProgress) (*str.WatchedProgress, *str.Response, error)
- func (s *ShowsService) UndoResetShowProgress(ctx context.Context, id *string) (*str.Response, error)
- type SyncService
- func (s *SyncService) AddItemsToCollection(ctx context.Context, items *str.ItemsList) (*str.CollectionAddResult, error)
- func (s *SyncService) AddItemsToFavorites(ctx context.Context, items *str.HistoryItems) (*str.AddResult, error)
- func (s *SyncService) AddItemsToHistory(ctx context.Context, items *str.HistoryItems) (*str.AddResult, error)
- func (s *SyncService) AddItemsToRatings(ctx context.Context, items *str.RatingItems) (*str.AddResult, error)
- func (s *SyncService) AddItemsToWatchlist(ctx context.Context, items *str.HistoryItems) (*str.AddResult, error)
- func (s *SyncService) GetCollectedSeasons(ctx context.Context, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
- func (s *SyncService) GetCollection(ctx context.Context, types *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
- func (s *SyncService) GetFavorites(ctx context.Context, types *string, sortBy *string, sortHow *string, ...) ([]*str.ExportlistItem, *str.Response, error)
- func (s *SyncService) GetLastActivity(ctx context.Context) (*str.UserLastActivities, *str.Response, error)
- func (s *SyncService) GetPlaybackProgress(ctx context.Context, types *string, opts *uri.ListOptions) ([]*str.PlaybackProgress, *str.Response, error)
- func (s *SyncService) GetRatings(ctx context.Context, types *string, rating *string, opts *uri.ListOptions) ([]*str.RatingListItem, *str.Response, error)
- func (s *SyncService) GetWatched(ctx context.Context, watchType *string, opts *uri.ListOptions) ([]*str.UserWatched, *str.Response, error)
- func (s *SyncService) GetWatchedHistory(ctx context.Context, id *int, types *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
- func (s *SyncService) GetWatchlist(ctx context.Context, types *string, sortBy *string, sortHow *string, ...) ([]*str.ExportlistItem, *str.Response, error)
- func (s *SyncService) RemoveItemsFromCollection(ctx context.Context, items *str.ItemsList) (*str.CollectionRemoveResult, error)
- func (s *SyncService) RemoveItemsFromFavorites(context context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
- func (s *SyncService) RemoveItemsFromHistory(ctx context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
- func (s *SyncService) RemoveItemsFromRatings(ctx context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
- func (s *SyncService) RemoveItemsFromWatchlist(context context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
- func (s *SyncService) RemovePlaybackItem(ctx context.Context, id *int) (*str.Response, error)
- func (s *SyncService) ReorderFavoritesItems(ctx context.Context, reorder *str.ItemsToReorder) (*str.ReorderResults, error)
- func (s *SyncService) ReorderWatchlistItems(ctx context.Context, reorder *str.ItemsToReorder) (*str.ReorderResults, error)
- func (s *SyncService) UpdateFavoriteItem(context context.Context, itemID int, update *str.FavoriteItem) error
- func (s *SyncService) UpdateFavorites(context context.Context, update *str.PersonalList) (*str.PersonalList, error)
- func (s *SyncService) UpdateWatchlist(ctx context.Context, update *str.PersonalList) (*str.PersonalList, error)
- func (s *SyncService) UpdateWatchlistItem(context context.Context, itemID int, update *str.WatchlistItem) error
- type UpgradeRequiredError
- type UpgradeUserLimitsError
- type UsersService
- func (u *UsersService) AddHiddenItems(ctx context.Context, items *str.HistoryItems, section string) (*str.AddResult, error)
- func (u *UsersService) AddListItems(ctx context.Context, user *string, listID *string, items *str.HistoryItems) (*str.AddResult, *str.Response, error)
- func (u *UsersService) AddPersonalList(ctx context.Context, user *string, list *str.PersonalList) (*str.PersonalList, *str.Response, error)
- func (u *UsersService) ApproveFollowRequest(ctx context.Context, request int) (*str.FollowRequest, *str.Response, error)
- func (u *UsersService) Block(ctx context.Context, user *string) (*str.Response, error)
- func (u *UsersService) DeleteList(ctx context.Context, user *string, listID *string) (*str.Response, error)
- func (u *UsersService) DenyFollowRequest(ctx context.Context, request int) (*str.FollowRequest, *str.Response, error)
- func (u *UsersService) Follow(ctx context.Context, user *string) (*str.FollowResult, *str.Response, error)
- func (u *UsersService) GetBlockedUsers(ctx context.Context, options *uri.ListOptions) ([]*str.UserBlocked, *str.Response, error)
- func (u *UsersService) GetCollaborations(ctx context.Context, user *string, opts *uri.ListOptions) ([]*str.PersonalList, *str.Response, error)
- func (u *UsersService) GetCollection(ctx context.Context, user *string, stype *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
- func (u *UsersService) GetComments(ctx context.Context, user *string, commentType *string, strType *string, ...) ([]*str.CommentItem, *str.Response, error)
- func (u *UsersService) GetFavorites(ctx context.Context, user *string, strType *string, sortBy *string, ...) ([]*str.ExportlistItem, *str.Response, error)
- func (u *UsersService) GetFavoritesComments(ctx context.Context, user *string, sort *string, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
- func (u *UsersService) GetFollowRequests(ctx context.Context, options *uri.ListOptions) ([]*str.FollowRequest, *str.Response, error)
- func (u *UsersService) GetFollowers(ctx context.Context, user *string, options *uri.ListOptions) ([]*str.Follower, *str.Response, error)
- func (u *UsersService) GetFollowing(ctx context.Context, user *string, options *uri.ListOptions) ([]*str.Follower, *str.Response, error)
- func (u *UsersService) GetFriends(ctx context.Context, user *string, options *uri.ListOptions) ([]*str.Friend, *str.Response, error)
- func (u *UsersService) GetHiddenItems(ctx context.Context, section *string, opts *uri.ListOptions) ([]*str.HiddenItem, *str.Response, error)
- func (u *UsersService) GetHistory(ctx context.Context, user *string, strType *string, id *int, ...) ([]*str.ExportlistItem, *str.Response, error)
- func (u *UsersService) GetItemstOnAPersonalList(ctx context.Context, id *string, listID *string, t *string) ([]*str.UserListItem, *str.Response, error)
- func (u *UsersService) GetLikes(ctx context.Context, user *string, stype *string, opts *uri.ListOptions) ([]*str.UserLike, *str.Response, error)
- func (u *UsersService) GetList(ctx context.Context, user *string, listID *string, opts *uri.ListOptions) (*str.PersonalList, *str.Response, error)
- func (u *UsersService) GetListComments(ctx context.Context, user *string, listID *string, sort *string, ...) ([]*str.ListComment, *str.Response, error)
- func (u *UsersService) GetListItems(ctx context.Context, user *string, listID *string, strType *string, ...) ([]*str.UserListItem, *str.Response, error)
- func (u *UsersService) GetListLikes(ctx context.Context, user *string, listID *string, opts *uri.ListOptions) ([]*str.UserLike, *str.Response, error)
- func (u *UsersService) GetNotes(ctx context.Context, user *string, strType *string, opts *uri.ListOptions) ([]*str.NotesItem, *str.Response, error)
- func (u *UsersService) GetPendingFollowingRequests(ctx context.Context, options *uri.ListOptions) ([]*str.FollowRequest, *str.Response, error)
- func (u *UsersService) GetProfile(ctx context.Context, s *string) (*str.UserProfile, *str.Response, error)
- func (u *UsersService) GetRatings(ctx context.Context, user *string, strType *string, rating *string, ...) ([]*str.RatingListItem, *str.Response, error)
- func (u *UsersService) GetSavedFilters(ctx context.Context, section *string) ([]*str.SavedFilter, *str.Response, error)
- func (u *UsersService) GetStats(ctx context.Context, id *string) (*str.UserStats, *str.Response, error)
- func (u *UsersService) GetUserProfile(ctx context.Context, id *string) (*str.UserProfile, *str.Response, error)
- func (u *UsersService) GetUsersPersonalLists(ctx context.Context, id *string) ([]*str.PersonalList, *str.Response, error)
- func (u *UsersService) GetWatched(ctx context.Context, id *string, watchType *string, opts *uri.ListOptions) ([]*str.UserWatched, *str.Response, error)
- func (u *UsersService) GetWatchlist(ctx context.Context, user *string, types *string, sortBy *string, ...) ([]*str.ExportlistItem, *str.Response, error)
- func (u *UsersService) GetWatchlistComments(ctx context.Context, user *string, sort *string, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
- func (u *UsersService) ListLike(ctx context.Context, user *string, listID *string) (*str.Response, error)
- func (u *UsersService) ListReport(ctx context.Context, user *string, listID *string, report *str.ListReport) (*str.ListReportResult, *str.Response, error)
- func (u *UsersService) RemoveHiddenItems(ctx context.Context, items *str.HistoryItems, section string) (*str.RemoveResult, error)
- func (u *UsersService) RemoveListItems(ctx context.Context, user *string, listID *string, items *str.HistoryItems) (*str.RemoveResult, *str.Response, error)
- func (u *UsersService) RemoveListLike(ctx context.Context, user *string, listID *string) (*str.Response, error)
- func (u *UsersService) ReorderListItems(ctx context.Context, user *string, listID *string, items *str.ItemsToReorder) (*str.ReorderResults, *str.Response, error)
- func (u *UsersService) ReorderLists(ctx context.Context, user *string, items *str.ItemsToReorder) (*str.ReorderResults, *str.Response, error)
- func (u *UsersService) Report(ctx context.Context, user *string, report *str.UserReport) (*str.UserReportResult, *str.Response, error)
- func (u *UsersService) RetrieveSettings(ctx context.Context) (*str.UserSettings, *str.Response, error)
- func (u *UsersService) Unblock(ctx context.Context, user *string) (*str.Response, error)
- func (u *UsersService) Unfollow(ctx context.Context, user *string) (*str.Response, error)
- func (u *UsersService) UpdateList(ctx context.Context, user *string, listID *string, update *str.PersonalList) (*str.PersonalList, *str.Response, error)
- func (u *UsersService) UpdateListItem(ctx context.Context, user *string, listID *string, listItemID *int, ...) (*str.Response, error)
- func (u *UsersService) Watching(ctx context.Context, user *string, options *uri.ListOptions) (*str.WatchingResult, *str.Response, error)
- type ValidationError
Constants ¶
const ( HeaderPaginationPage = "X-Pagination-Page" HeaderPaginationPageCount = "X-Pagination-Page-Count" HeaderRateLimit = "X-RateLimit" HeaderRetryAfter = "Retry-After" HeaderUpgradeURL = "X-Upgrade-URL" TimezoneKey contextKey = "timezone" Version = "2" )
basic consts for client
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbuseRateLimitError ¶
type AbuseRateLimitError struct {
Response *http.Response
RetryAfter *time.Duration
Message string `json:"message"`
}
AbuseRateLimitError occurs when trakt.tv returns 429 too many requests header
func (*AbuseRateLimitError) Error ¶
func (r *AbuseRateLimitError) Error() string
type BadRequestError ¶ added in v1.11.0
BadRequestError occurs when trakt.tv returns 400 error
func (*BadRequestError) Error ¶ added in v1.11.0
func (r *BadRequestError) Error() string
type CalendarsService ¶
type CalendarsService Service
CalendarsService handles communication with the calendars related methods of the Trakt API.
func (*CalendarsService) GetDVDReleases ¶
func (c *CalendarsService) GetDVDReleases(ctx context.Context, actionType *string, startDate *string, days *int, opts *uri.ListOptions) ([]*str.CalendarList, *str.Response, error)
GetDVDReleases Returns all movies with a DVD release date during the time period specified.
API docs: https://trakt.docs.apiary.io/#reference/calendars/my-dvd/get-dvd-releases API docs: https://trakt.docs.apiary.io/#reference/calendars/all-dvd/get-dvd-releases
func (*CalendarsService) GetFinales ¶
func (c *CalendarsService) GetFinales(ctx context.Context, actionType *string, startDate *string, days *int, opts *uri.ListOptions) ([]*str.CalendarList, *str.Response, error)
GetFinales Returns all show finales (mid_season_finale, season_finale, series_finale) airing during the time period specified.
API docs: https://trakt.docs.apiary.io/#reference/calendars/my-finales/get-finales API docs: https://trakt.docs.apiary.io/#reference/calendars/all-finales/get-finales
func (*CalendarsService) GetMovies ¶
func (c *CalendarsService) GetMovies(ctx context.Context, actionType *string, startDate *string, days *int, opts *uri.ListOptions) ([]*str.CalendarList, *str.Response, error)
GetMovies Returns all movies with a release date during the time period specified.
API docs: https://trakt.docs.apiary.io/#reference/calendars/my-movies/get-movies API docs: https://trakt.docs.apiary.io/#reference/calendars/all-movies/get-movies
func (*CalendarsService) GetNewShows ¶
func (c *CalendarsService) GetNewShows(ctx context.Context, actionType *string, startDate *string, days *int, opts *uri.ListOptions) ([]*str.CalendarList, *str.Response, error)
GetNewShows Returns all new show premieres airing during the time period specified.
API docs: https://trakt.docs.apiary.io/#reference/calendars/my-new-shows/get-new-shows API docs: https://trakt.docs.apiary.io/#reference/calendars/all-new-shows/get-new-shows
func (*CalendarsService) GetSeasonPremieres ¶
func (c *CalendarsService) GetSeasonPremieres(ctx context.Context, actionType *string, startDate *string, days *int, opts *uri.ListOptions) ([]*str.CalendarList, *str.Response, error)
GetSeasonPremieres Returns all show premieres (mid_season_premiere, season_premiere, series_premiere) airing during the time period specified.
API docs: https://trakt.docs.apiary.io/#reference/calendars/my-season-premieres/get-season-premieres API docs: https://trakt.docs.apiary.io/#reference/calendars/all-season-premieres/get-season-premieres
func (*CalendarsService) GetShows ¶
func (c *CalendarsService) GetShows(ctx context.Context, actionType *string, startDate *string, days *int, opts *uri.ListOptions) ([]*str.CalendarList, *str.Response, error)
GetShows Returns all shows airing during the time period specified.
API docs: https://trakt.docs.apiary.io/#reference/calendars/my-shows/get-shows API docs: https://trakt.docs.apiary.io/#reference/calendars/all-shows/get-shows
type CertificationsService ¶ added in v1.6.0
type CertificationsService Service
CertificationsService handles communication with the certifications related methods of the Trakt API.
func (*CertificationsService) GetCertifications ¶ added in v1.6.0
func (c *CertificationsService) GetCertifications(ctx context.Context, strType *string) (*str.Certifications, *str.Response, error)
GetCertifications Get a list of all certifications, including names, slugs, and descriptions.
API docs: https://trakt.docs.apiary.io/#reference/certifications/list/get-certifications
type CheckinService ¶ added in v1.5.0
type CheckinService Service
CheckinService handles communication with the checkin related methods of the Trakt API.
func (*CheckinService) CheckintoAnItem ¶ added in v1.5.0
func (c *CheckinService) CheckintoAnItem(ctx context.Context, checkin *str.Checkin) (*str.Checkin, *str.Response, error)
CheckintoAnItem Check into a movie or episode.
API docs: https://trakt.docs.apiary.io/#reference/checkin/checkin/check-into-an-item
func (*CheckinService) DeleteAnyActiveCheckins ¶ added in v1.5.0
DeleteAnyActiveCheckins Removes any active checkins, no need to provide a specific item.
API docs: https://trakt.docs.apiary.io/#reference/checkin/checkin/delete-any-active-checkins
type Client ¶
type Client struct {
RateLimitReset time.Time
BaseURL *url.URL
UpgradeURL *url.URL
Oauth *OauthService
Users *UsersService
Sync *SyncService
People *PeopleService
Calendars *CalendarsService
Certifications *CertificationsService
Countries *CountriesService
Checkin *CheckinService
Comments *CommentsService
Genres *GenresService
Search *SearchService
Languages *LanguagesService
Lists *ListsService
Movies *MoviesService
Networks *NetworksService
Notes *NotesService
Episodes *EpisodesService
Recommendations *RecommendationsService
Shows *ShowsService
Scrobble *ScrobbleService
Seasons *SeasonsService
// contains filtered or unexported fields
}
A Client manages communication with the trakt.tv API.
func NewClient ¶
NewClient returns a new API client. If a nil httpClient is provided, a new http.Client will be used.
func (*Client) AdjustTimestamps ¶ added in v1.11.0
AdjustTimestamps update timestamps with user timezone
func (*Client) BuildCtxFromOptions ¶ added in v1.11.0
BuildCtxFromOptions create ctx with custom options
func (*Client) CheckResponse ¶
CheckResponse checks if api response have errors.
func (*Client) CheckRetryAfter ¶
func (c *Client) CheckRetryAfter(req *http.Request) *AbuseRateLimitError
CheckRetryAfter check Retry After header.
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred
func (*Client) GetHeaders ¶ added in v1.11.0
GetHeaders is for get headers map
func (*Client) GetTimezone ¶ added in v1.11.0
GetTimezone to get timezone from ctx object
func (*Client) NewRequest ¶
func (c *Client) NewRequest(method, urlStr string, body any, opts ...RequestOption) (*http.Request, error)
NewRequest creates an API request.
func (*Client) NewResponse ¶
NewResponse creates a new Response for the provided http.Response. r must not be nil.
func (*Client) ParseRateLimit ¶
ParseRateLimit parses related headers, and returns the time to retry after.
func (*Client) ParseUpgradeUser ¶ added in v1.1.0
ParseUpgradeUser parses related headers, and returns upgradeUrl.
func (*Client) UpdateHeaders ¶
UpdateHeaders is for update client headers map
type CommentsService ¶ added in v1.6.0
type CommentsService Service
CommentsService handles communication with the comments related methods of the Trakt API.
func (*CommentsService) DeleteComment ¶ added in v1.6.0
DeleteComment to delete a single comment. API docs: https://trakt.docs.apiary.io/#reference/comments/comment/delete-a-comment-or-reply
func (*CommentsService) GetComment ¶ added in v1.6.0
func (c *CommentsService) GetComment(ctx context.Context, id *int) (*str.Comment, *str.Response, error)
GetComment Returns comment object.
func (*CommentsService) GetCommentItem ¶ added in v1.6.0
func (c *CommentsService) GetCommentItem(ctx context.Context, id *int, opts *uri.ListOptions) (*str.CommentMediaItem, *str.Response, error)
GetCommentItem Returns comment media item object. API docs: https://trakt.docs.apiary.io/#reference/comments/item/get-the-attached-media-item
func (*CommentsService) GetCommentUserLikes ¶ added in v1.6.0
func (c *CommentsService) GetCommentUserLikes(ctx context.Context, id *int, opts *uri.ListOptions) ([]*str.CommentUserLike, *str.Response, error)
GetCommentUserLikes Returns all users who liked a comment. API docs: https://trakt.docs.apiary.io/#reference/comments/item/get-all-users-who-liked-a-comment
func (*CommentsService) GetRecentComments ¶ added in v1.6.0
func (c *CommentsService) GetRecentComments(ctx context.Context, contentType *string, strType *string, opts *uri.ListOptions) ([]*str.CommentItem, *str.Response, error)
GetRecentComments Returns the most recently written comments across all of Trakt. API docs: https://trakt.docs.apiary.io/#reference/comments/recent/get-recently-created-comments
func (*CommentsService) GetRepliesForComment ¶ added in v1.6.0
func (c *CommentsService) GetRepliesForComment(ctx context.Context, opts *uri.ListOptions, id *int) ([]*str.Comment, *str.Response, error)
GetRepliesForComment Returns all replies for a comment. API docs: https://trakt.docs.apiary.io/#reference/comments/replies/get-replies-for-a-comment
func (*CommentsService) GetTrendingComments ¶ added in v1.6.0
func (c *CommentsService) GetTrendingComments(ctx context.Context, contentType *string, strType *string, opts *uri.ListOptions) ([]*str.CommentItem, *str.Response, error)
GetTrendingComments Returns all comments with the most likes and replies over the last 7 days. API docs: https://trakt.docs.apiary.io/#reference/comments/trending/get-trending-comments
func (*CommentsService) GetUpdatedComments ¶ added in v1.6.0
func (c *CommentsService) GetUpdatedComments(ctx context.Context, contentType *string, strType *string, opts *uri.ListOptions) ([]*str.CommentItem, *str.Response, error)
GetUpdatedComments Returns the most recently updated comments across all of Trakt. API docs: https://trakt.docs.apiary.io/#reference/comments/updates/get-recently-updated-comments
func (*CommentsService) LikeComment ¶ added in v1.6.0
LikeComment Votes help determine popular comments. Only one like is allowed per comment per user.
API docs: https://trakt.docs.apiary.io/#reference/comments/like/like-a-comment
func (*CommentsService) PostAComment ¶ added in v1.6.0
func (c *CommentsService) PostAComment(ctx context.Context, comment *str.Comment) (*str.Comment, *str.Response, error)
PostAComment Add a new comment to a movie, show, season, episode, or list.
API docs:https://trakt.docs.apiary.io/#reference/comments/comments/post-a-comment
func (*CommentsService) RemoveLikeComment ¶ added in v1.6.0
RemoveLikeComment Remove a like on a comment.
API docs: https://trakt.docs.apiary.io/#reference/comments/like/remove-like-on-a-comment
func (*CommentsService) ReplyAComment ¶ added in v1.6.0
func (c *CommentsService) ReplyAComment(ctx context.Context, id *int, reply *str.Comment) (*str.Comment, *str.Response, error)
ReplyAComment Add a new reply to an existing comment. API docs:https://trakt.docs.apiary.io/#reference/comments/replies/post-a-reply-for-a-comment
func (*CommentsService) UpdateComment ¶ added in v1.6.0
func (c *CommentsService) UpdateComment(ctx context.Context, id *int, comment *str.Comment) (*str.Comment, *str.Response, error)
UpdateComment to update a single comment. API docs: https://trakt.docs.apiary.io/#reference/comments/comment/update-a-comment-or-reply
type ConflictError ¶ added in v1.5.0
ConflictError occurs when trakt.tv returns 409 error
func (*ConflictError) Error ¶ added in v1.5.0
func (r *ConflictError) Error() string
type CountriesService ¶ added in v1.7.0
type CountriesService Service
CountriesService handles communication with the countries related methods of the Trakt API.
func (*CountriesService) GetCountries ¶ added in v1.7.0
func (c *CountriesService) GetCountries(ctx context.Context, strType *string) ([]*str.Country, *str.Response, error)
GetCountries Get a list of all countries, including names and codes.
API docs: https://trakt.docs.apiary.io/#reference/countries/list/get-countries
type EpisodesService ¶ added in v1.5.0
type EpisodesService Service
EpisodesService handles communication with the episodes related methods of the Trakt API.
type ForbiddenError ¶ added in v1.14.0
ForbiddenError occurs when trakt.tv returns 403 error
func (*ForbiddenError) Error ¶ added in v1.14.0
func (r *ForbiddenError) Error() string
type GenresService ¶ added in v1.7.0
type GenresService Service
GenresService handles communication with the genres related methods of the Trakt API.
type InvalidUserError ¶ added in v1.9.0
InvalidUserError occurs when trakt.tv returns 401 error
func (*InvalidUserError) Error ¶ added in v1.9.0
func (r *InvalidUserError) Error() string
type LanguagesService ¶ added in v1.7.0
type LanguagesService Service
LanguagesService handles communication with the languages related methods of the Trakt API.
func (*LanguagesService) GetLanguages ¶ added in v1.7.0
func (g *LanguagesService) GetLanguages(ctx context.Context, strType *string) ([]*str.Language, *str.Response, error)
GetLanguages Get a list of all languages, including names and codes.
API docs: https://trakt.docs.apiary.io/#reference/languages/list/get-languages
type ListsService ¶ added in v1.4.0
type ListsService Service
ListsService handles communication with the lists related methods of the Trakt API.
func (*ListsService) GetAllUsersWhoLikedList ¶ added in v1.4.0
func (l *ListsService) GetAllUsersWhoLikedList(ctx context.Context, opts *uri.ListOptions, id *string) ([]*str.UserLike, *str.Response, error)
GetAllUsersWhoLikedList Returns all users who liked a list.
API docs: https://trakt.docs.apiary.io/#reference/lists/list-likes/get-all-users-who-liked-a-list
func (*ListsService) GetList ¶ added in v1.4.0
func (l *ListsService) GetList(ctx context.Context, id *string) (*str.PersonalList, *str.Response, error)
GetList Returns a single list. Use the /lists/:id/items method to get the actual items this list contains.
API docs: https://trakt.docs.apiary.io/#reference/lists/list/get-list
func (*ListsService) GetListComments ¶ added in v1.4.0
func (l *ListsService) GetListComments(ctx context.Context, id *string, sort *string, opts *uri.ListOptions) ([]*str.ListComment, *str.Response, error)
GetListComments Returns comments from single list.
API docs: https://trakt.docs.apiary.io/#reference/lists/list-comments/get-all-list-comments
func (*ListsService) GetListItems ¶ added in v1.4.0
func (l *ListsService) GetListItems(ctx context.Context, id *string, t *string, opts *uri.ListOptions) ([]*str.UserListItem, *str.Response, error)
GetListItems Returns items from single list.
API docs: https://trakt.docs.apiary.io/#reference/lists/list-items/get-items-on-a-list
func (*ListsService) GetPopularLists ¶ added in v1.4.0
func (l *ListsService) GetPopularLists(ctx context.Context, opts *uri.ListOptions) ([]*str.List, *str.Response, error)
GetPopularLists Returns the most popular lists. Popularity is calculated using total number of likes and comments..
API docs: https://trakt.docs.apiary.io/#reference/lists/popular/get-popular-lists
func (*ListsService) GetTrendingLists ¶ added in v1.4.0
func (l *ListsService) GetTrendingLists(ctx context.Context, opts *uri.ListOptions) ([]*str.List, *str.Response, error)
GetTrendingLists Returns all lists with the most likes and comments over the last 7 days.
API docs: https://trakt.docs.apiary.io/#reference/lists/trending/get-trending-lists
func (*ListsService) LikeList ¶ added in v1.4.0
LikeList Votes help determine popular lists. Only one like is allowed per list per user.
API docs: https://trakt.docs.apiary.io/#reference/lists/list-like/like-a-list
func (*ListsService) RemoveLikeList ¶ added in v1.4.0
RemoveLikeList Remove a like on a list.
API docs: https://trakt.docs.apiary.io/#reference/lists/list-like/remove-like-on-a-list
type MoviesService ¶ added in v1.5.0
type MoviesService Service
MoviesService handles communication with the movies related methods of the Trakt API.
func (*MoviesService) GetAllMovieAliases ¶ added in v1.8.0
func (m *MoviesService) GetAllMovieAliases(ctx context.Context, id *string) ([]*str.Alias, *str.Response, error)
GetAllMovieAliases Returns all title aliases for a movie. Includes country where name is different.
API docs: https://trakt.docs.apiary.io/#reference/movies/aliases/get-all-movie-aliases
func (*MoviesService) GetAllMovieComments ¶ added in v1.8.0
func (m *MoviesService) GetAllMovieComments(ctx context.Context, id *string, sort *string, opts *uri.ListOptions) ([]*str.Comment, *str.Response, error)
GetAllMovieComments Returns all top level comments for a movie. By default, the newest comments are returned first. Other sorting options include oldest, most likes, most replies, highest rated, lowest rated, and most plays..
API docs: https://trakt.docs.apiary.io/#reference/movies/comments/get-all-movie-comments
func (*MoviesService) GetAllMovieReleases ¶ added in v1.8.0
func (m *MoviesService) GetAllMovieReleases(ctx context.Context, id *string, country *string) ([]*str.Release, *str.Response, error)
GetAllMovieReleases Returns all releases for a movie including country, certification, release date, release type, and note.
API docs: https://trakt.docs.apiary.io/#reference/movies/releases/get-all-movie-releases
func (*MoviesService) GetAllMovieTranslations ¶ added in v1.8.0
func (m *MoviesService) GetAllMovieTranslations(ctx context.Context, id *string, language *string) ([]*str.Translation, *str.Response, error)
GetAllMovieTranslations Returns all translations for a movie, including language and translated values for title, tagline and overview.
API docs: https://trakt.docs.apiary.io/#reference/movies/translations/get-all-movie-translations
func (*MoviesService) GetAllPeopleForMovie ¶ added in v1.8.0
func (m *MoviesService) GetAllPeopleForMovie(ctx context.Context, id *string, opts *uri.ListOptions) (*str.MoviePeople, *str.Response, error)
GetAllPeopleForMovie Returns all cast and crew for a movie. Each cast member will have a characters array and a standard person object.
API docs: https://trakt.docs.apiary.io/#reference/movies/people/get-all-people-for-a-movie
func (*MoviesService) GetAnticipatedMovies ¶ added in v1.8.0
func (m *MoviesService) GetAnticipatedMovies(ctx context.Context, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
GetAnticipatedMovies Returns the most anticipated movies based on the number of lists a movie appears on. API docs: https://trakt.docs.apiary.io/#reference/movies/anticipated/get-the-most-anticipated-movies
func (*MoviesService) GetBoxoffice ¶ added in v1.8.0
func (m *MoviesService) GetBoxoffice(ctx context.Context, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
GetBoxoffice Returns the top 10 grossing movies in the U.S. box office last weekend. Updated every Monday morning. API docs: https://trakt.docs.apiary.io/#reference/movies/box-office/get-the-weekend-box-office
func (*MoviesService) GetCollectedMovies ¶ added in v1.8.0
func (m *MoviesService) GetCollectedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
GetCollectedMovies Returns the most collected (unique users) movies in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/movies/collected/get-the-most-collected-movies
func (*MoviesService) GetFavoritedMovies ¶ added in v1.8.0
func (m *MoviesService) GetFavoritedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
GetFavoritedMovies Returns the most favorited movies in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/movies/favorited/get-favorited-movies
func (*MoviesService) GetListsContainingMovie ¶ added in v1.8.0
func (m *MoviesService) GetListsContainingMovie(ctx context.Context, id *string, t *string, sort *string, opts *uri.ListOptions) ([]*str.PersonalList, *str.Response, error)
GetListsContainingMovie Returns all lists that contain this movie. By default, personal lists are returned sorted by the most popular.
API docs: https://trakt.docs.apiary.io/#reference/movies/lists/get-lists-containing-this-movie
func (*MoviesService) GetMovie ¶ added in v1.5.0
func (m *MoviesService) GetMovie(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Movie, *str.Response, error)
GetMovie Returns movie object.
func (*MoviesService) GetMovieRatings ¶ added in v1.8.0
func (m *MoviesService) GetMovieRatings(ctx context.Context, id *string) (*str.MovieRatings, *str.Response, error)
GetMovieRatings Returns rating (between 0 and 10) and distribution for a movie.
API docs: https://trakt.docs.apiary.io/#reference/movies/ratings/get-movie-ratings
func (*MoviesService) GetMovieStats ¶ added in v1.8.0
func (m *MoviesService) GetMovieStats(ctx context.Context, id *string) (*str.MovieStats, *str.Response, error)
GetMovieStats Returns lots of movie stats.
API docs: https://trakt.docs.apiary.io/#reference/movies/stats/get-movie-stats
func (*MoviesService) GetMovieStudios ¶ added in v1.8.0
func (m *MoviesService) GetMovieStudios(ctx context.Context, id *string) ([]*str.Studio, *str.Response, error)
GetMovieStudios Returns all studios for movie.
API docs: https://trakt.docs.apiary.io/#reference/movies/studios/get-movie-studios
func (*MoviesService) GetMovieVideos ¶ added in v1.8.0
func (m *MoviesService) GetMovieVideos(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Video, *str.Response, error)
GetMovieVideos Returns all videos including trailers, teasers, clips, and featurettes.
API docs: https://trakt.docs.apiary.io/#reference/movies/videos/get-all-videos
func (*MoviesService) GetMovieWatching ¶ added in v1.8.0
func (m *MoviesService) GetMovieWatching(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.UserProfile, *str.Response, error)
GetMovieWatching Returns all users watching this movie right now.
API docs: https://trakt.docs.apiary.io/#reference/movies/studios/get-users-watching-right-now
func (*MoviesService) GetPlayedMovies ¶ added in v1.8.0
func (m *MoviesService) GetPlayedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
GetPlayedMovies Returns the most played (a single user can watch multiple times) movies in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/movies/played/get-the-most-played-movies
func (*MoviesService) GetPopularMovies ¶ added in v1.8.0
func (m *MoviesService) GetPopularMovies(ctx context.Context, opts *uri.ListOptions) ([]*str.Movie, *str.Response, error)
GetPopularMovies Returns the most popular movies. Popularity is calculated using the rating percentage and the number of ratings. API docs: https://trakt.docs.apiary.io/#reference/movies/popular/get-popular-movies
func (*MoviesService) GetRecentlyUpdatedMovies ¶ added in v1.8.0
func (m *MoviesService) GetRecentlyUpdatedMovies(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
GetRecentlyUpdatedMovies Returns all movies updated since the specified UTC date and time.
API docs: https://trakt.docs.apiary.io/#reference/movies/updates/get-recently-updated-movies
func (*MoviesService) GetRecentlyUpdatedMoviesTraktIDs ¶ added in v1.8.0
func (m *MoviesService) GetRecentlyUpdatedMoviesTraktIDs(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*int, *str.Response, error)
GetRecentlyUpdatedMoviesTraktIDs Returns all movie Trakt IDs updated since the specified UTC date and time.
API docs: https://trakt.docs.apiary.io/#reference/movies/updated-ids/get-recently-updated-movie-trakt-ids
func (*MoviesService) GetRelatedMovies ¶ added in v1.8.0
func (m *MoviesService) GetRelatedMovies(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Movie, *str.Response, error)
GetRelatedMovies Returns related and similar movies.
API docs: https://trakt.docs.apiary.io/#reference/movies/related/get-related-movies
func (*MoviesService) GetTrendingMovies ¶ added in v1.8.0
func (m *MoviesService) GetTrendingMovies(ctx context.Context, opts *uri.ListOptions) ([]*str.MoviesItem, *str.Response, error)
GetTrendingMovies Returns the most watched movies over the last 24 hours. Movies with the most watchers are returned first. API docs: https://trakt.docs.apiary.io/#reference/movies/trending/get-trending-movies
func (*MoviesService) GetWatchedMovies ¶ added in v1.8.0
func (m *MoviesService) GetWatchedMovies(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.MoviesItem, *str.Response, error)
GetWatchedMovies Returns the most watched (unique users) movies in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/movies/watched/get-the-most-watched-movies
func (*MoviesService) RefreshMovieMetadata ¶ added in v1.8.0
func (m *MoviesService) RefreshMovieMetadata(ctx context.Context, id *string) (*str.Response, error)
RefreshMovieMetadata Queue this movie for a full metadata and image refresh. It might take up to 8 hours for the updated metadata to be availabe through the API.
API docs: https://trakt.docs.apiary.io/#reference/movies/refresh/refresh-movie-metadata
type NetworksService ¶ added in v1.9.0
type NetworksService Service
NetworksService handles communication with the movies related methods of the Trakt API.
func (*NetworksService) GetNetworksList ¶ added in v1.9.0
func (m *NetworksService) GetNetworksList(ctx context.Context, opts *uri.ListOptions) ([]*str.TvNetwork, *str.Response, error)
GetNetworksList Get a list of all TV networks, including the name, country, and ids.
type NotFoundError ¶ added in v1.4.0
NotFoundError occurs when trakt.tv returns 404 error
func (*NotFoundError) Error ¶ added in v1.4.0
func (r *NotFoundError) Error() string
type NotesService ¶ added in v1.9.0
type NotesService Service
NotesService handles communication with the notes related methods of the Trakt API.
func (*NotesService) AddNotes ¶ added in v1.9.0
func (n *NotesService) AddNotes(ctx context.Context, notes *str.Notes) (*str.Notes, *str.Response, error)
AddNotes Add a new notes to a movie, show, season, episode, or person.
API docs:https://trakt.docs.apiary.io/#reference/notes/notes/add-notes
func (*NotesService) DeleteNotes ¶ added in v1.9.0
DeleteNotes Delete a single note.
API docs: https://trakt.docs.apiary.io/#reference/notes/note/delete-a-note
func (*NotesService) GetNotes ¶ added in v1.9.0
GetNotes Return a single note.
API docs:https://trakt.docs.apiary.io/#reference/notes/note/get-a-note
func (*NotesService) GetNotesItem ¶ added in v1.9.0
func (n *NotesService) GetNotesItem(ctx context.Context, id *string) (*str.NotesItem, *str.Response, error)
GetNotesItem Returns the item this note is attached_to.
API docs:https://trakt.docs.apiary.io/#reference/notes/item/get-the-attached-item
func (*NotesService) UpdateNotes ¶ added in v1.9.0
func (n *NotesService) UpdateNotes(ctx context.Context, id *string, notes *str.Notes) (*str.Notes, *str.Response, error)
UpdateNotes Update a single note (500 maximum characters).
API docs:https://trakt.docs.apiary.io/#reference/notes/note/update-a-note
type OauthService ¶
type OauthService Service
OauthService handles communication with the oauth related methods of the Trakt API.
API docs: https://trakt.docs.apiary.io/#reference/authentication-oauth
func (*OauthService) ExchangeRefreshTokenForAccessToken ¶
func (o *OauthService) ExchangeRefreshTokenForAccessToken(ctx context.Context, deviceToken *str.CurrentDeviceToken) (*str.DeviceToken, *str.Response, error)
ExchangeRefreshTokenForAccessToken Use the refresh_token to get a new access_token without asking the user to re-authenticate. The access_token is valid for 3 months before it needs to be refreshed again.
func (*OauthService) GenerateNewDeviceCodes ¶
func (o *OauthService) GenerateNewDeviceCodes(ctx context.Context, code *str.NewDeviceCode) (*str.DeviceCode, *str.Response, error)
GenerateNewDeviceCodes Generate new codes to start the device authentication process.
API docs: https://trakt.docs.apiary.io/#reference/authentication-devices/device-code/generate-new-device-codes
func (*OauthService) PoolForTheAccessToken ¶
func (o *OauthService) PoolForTheAccessToken(ctx context.Context, deviceToken *str.NewDeviceToken) (*str.DeviceToken, *str.Response, error)
PoolForTheAccessToken Use the device_code and poll at the interval (in seconds) to check if the user has authorized you app.
API docs: https://trakt.docs.apiary.io/#reference/authentication-devices/get-token/poll-for-the-access_token
type PeopleService ¶
type PeopleService Service
PeopleService handles communication with the people related methods of the Trakt API.
func (*PeopleService) GetAllPeopleForShow ¶ added in v1.10.0
func (p *PeopleService) GetAllPeopleForShow(ctx context.Context, id *string, opts *uri.ListOptions) (*str.ShowPeople, *str.Response, error)
GetAllPeopleForShow Returns all cast and crew for a show. Each cast member will have a characters array and a standard person object.
API docs: https://trakt.docs.apiary.io/#reference/shows/people/get-all-people-for-a-show
func (*PeopleService) GetListsContainingThisPerson ¶
func (p *PeopleService) GetListsContainingThisPerson(ctx context.Context, id *string, typeString *string, sort *string, opts *uri.ListOptions) ([]*str.PersonalList, *str.Response, error)
GetListsContainingThisPerson Returns all lists that contain this person.
API docs: https://trakt.docs.apiary.io/#reference/people/lists/get-lists-containing-this-person
func (*PeopleService) GetMovieCredits ¶
func (p *PeopleService) GetMovieCredits(ctx context.Context, id *string, opts *uri.ListOptions) (*str.PersonMovies, *str.Response, error)
GetMovieCredits Returns all movies where this person is in the cast or crew.
API docs: https://trakt.docs.apiary.io/#reference/people/movies/get-movie-credits
func (*PeopleService) GetRecentlyUpdatedPeople ¶
func (p *PeopleService) GetRecentlyUpdatedPeople(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*str.PersonItem, *str.Response, error)
GetRecentlyUpdatedPeople Returns all people updated since the specified UTC date and time.
API docs: https://trakt.docs.apiary.io/#reference/people/updates/get-recently-updated-people
func (*PeopleService) GetRecentlyUpdatedPeopleTraktIDs ¶
func (p *PeopleService) GetRecentlyUpdatedPeopleTraktIDs(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*int, *str.Response, error)
GetRecentlyUpdatedPeopleTraktIDs Returns all people Trakt IDs updated since the specified UTC date and time.
API docs: https://trakt.docs.apiary.io/#reference/people/updated-ids
func (*PeopleService) GetShowCredits ¶
func (p *PeopleService) GetShowCredits(ctx context.Context, id *string, opts *uri.ListOptions) (*str.PersonShows, *str.Response, error)
GetShowCredits Returns all shows where this person is in the cast or crew, including the episode_count for which they appear.
API docs: https://trakt.docs.apiary.io/#reference/people/shows/get-show-credits
func (*PeopleService) GetSinglePerson ¶
func (p *PeopleService) GetSinglePerson(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Person, *str.Response, error)
GetSinglePerson Returns a single person's details.
API docs: https://trakt.docs.apiary.io/#reference/people/summary/get-a-single-person
func (*PeopleService) RefreshPersonMetadata ¶ added in v1.5.0
func (p *PeopleService) RefreshPersonMetadata(ctx context.Context, id *string) (*str.Response, error)
RefreshPersonMetadata Queue this person for a full metadata and image refresh. It might take up to 8 hours for the updated metadata to be availabe through the API.
API docs: https://trakt.docs.apiary.io/#reference/people/refresh/refresh-person-metadata
type PreconditionFailedRequestError ¶ added in v1.13.0
type PreconditionFailedRequestError struct {
Response *http.Response
Message string `json:"message"`
}
PreconditionFailedRequestError occurs when trakt.tv returns 412 error
func (*PreconditionFailedRequestError) Error ¶ added in v1.13.0
func (r *PreconditionFailedRequestError) Error() string
type RecommendationsService ¶ added in v1.9.0
type RecommendationsService Service
RecommendationsService handles communication with the recommendations related methods of the Trakt API.
func (*RecommendationsService) GetMovieRecommendations ¶ added in v1.9.0
func (m *RecommendationsService) GetMovieRecommendations(ctx context.Context, opts *uri.ListOptions) ([]*str.Recommendation, *str.Response, error)
GetMovieRecommendations Movie recommendations for a user. API docs:https://trakt.docs.apiary.io/#reference/recommendations/movies/get-movie-recommendations
func (*RecommendationsService) GetShowRecommendations ¶ added in v1.9.0
func (m *RecommendationsService) GetShowRecommendations(ctx context.Context, opts *uri.ListOptions) ([]*str.Recommendation, *str.Response, error)
GetShowRecommendations Show recommendations for a user. API docs:https://trakt.docs.apiary.io/#reference/recommendations/shows/get-show-recommendations
func (*RecommendationsService) HideMovieRecommendation ¶ added in v1.9.0
func (m *RecommendationsService) HideMovieRecommendation(ctx context.Context, id *string) (*str.Response, error)
HideMovieRecommendation to hide a movie from getting recommended anymore.. API docs:https://trakt.docs.apiary.io/#reference/recommendations/hide-movie/hide-a-movie-recommendation
func (*RecommendationsService) HideShowRecommendation ¶ added in v1.9.0
func (m *RecommendationsService) HideShowRecommendation(ctx context.Context, id *string) (*str.Response, error)
HideShowRecommendation to hide a show from getting recommended anymore. API docs:https://trakt.docs.apiary.io/#reference/recommendations/hide-show/hide-a-show-recommendation
type RequestOption ¶
RequestOption represents an option that can modify an http.Request.
type ScrobbleService ¶ added in v1.9.0
type ScrobbleService Service
ScrobbleService handles communication with the scrobble related methods of the Trakt API.
func (*ScrobbleService) PauseScrobble ¶ added in v1.9.0
func (s *ScrobbleService) PauseScrobble(ctx context.Context, scrobble *str.Scrobble) (*str.Scrobble, *str.Response, error)
PauseScrobble Pause watching in a media server. API docs: https://trakt.docs.apiary.io/#reference/scrobble/pause/pause-watching-in-a-media-center
func (*ScrobbleService) StartScrobble ¶ added in v1.9.0
func (s *ScrobbleService) StartScrobble(ctx context.Context, scrobble *str.Scrobble) (*str.Scrobble, *str.Response, error)
StartScrobble Start watching in a media server. API docs:https://trakt.docs.apiary.io/#reference/scrobble/start/start-watching-in-a-media-center
func (*ScrobbleService) StopScrobble ¶ added in v1.9.0
func (s *ScrobbleService) StopScrobble(ctx context.Context, scrobble *str.Scrobble) (*str.Scrobble, *str.Response, error)
StopScrobble Stop watching in a media server. API docs: https://trakt.docs.apiary.io/#reference/scrobble/stop/stop-or-finish-watching-in-a-media-center
type SearchService ¶
type SearchService Service
SearchService handles communication with the search related methods of the Trakt API.
func (*SearchService) GetIDLookupResults ¶
func (s *SearchService) GetIDLookupResults(ctx context.Context, formatType *string, id *string, opts *uri.ListOptions) ([]*str.SearchListItem, *str.Response, error)
GetIDLookupResults Lookup items by their Trakt, IMDB, TMDB, or TVDB ID. If you use the search url without a type it might return multiple items if the id_type is not globally unique. Specify the type of results by sending a single value or a comma delimited string for multiple types.
API docs: https://trakt.docs.apiary.io/#reference/search/id-lookup/get-id-lookup-results
func (*SearchService) GetTextQueryResults ¶
func (s *SearchService) GetTextQueryResults(ctx context.Context, searchType *string, opts *uri.ListOptions) ([]*str.SearchListItem, *str.Response, error)
GetTextQueryResults Search all text fields that a media object contains (i.e. title, overview, etc). Results are ordered by the most relevant score. Specify the type of results by sending a single value or a comma delimited string for multiple types.
API docs: https://trakt.docs.apiary.io/#reference/search/text-query/get-text-query-results
type SeasonsService ¶ added in v1.6.0
type SeasonsService Service
SeasonsService handles communication with the seasons related methods of the Trakt API.
type ServerError ¶ added in v1.9.0
ServerError occurs when trakt.tv returns 500 error
func (*ServerError) Error ¶ added in v1.9.0
func (r *ServerError) Error() string
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service structure for other services
type ShowsService ¶ added in v1.5.0
type ShowsService Service
ShowsService handles communication with the shows related methods of the Trakt API.
func (*ShowsService) GetAllEpisodeComments ¶ added in v1.13.0
func (s *ShowsService) GetAllEpisodeComments(ctx context.Context, id *string, season *int, episode *int, sort *string, opts *uri.ListOptions) ([]*str.Comment, *str.Response, error)
GetAllEpisodeComments Returns all top level comments for an episode. By default, the newest comments are returned first. Other sorting options include oldest, most likes, most replies, highest rated, lowest rated, and most plays.. API docs: https://trakt.docs.apiary.io/#reference/episodes/comments/get-all-episode-comments
func (*ShowsService) GetAllEpisodeTranslations ¶ added in v1.13.0
func (s *ShowsService) GetAllEpisodeTranslations(ctx context.Context, id *string, season *int, episode *int, language *string) ([]*str.Translation, *str.Response, error)
GetAllEpisodeTranslations Returns all translations for an episode, including language and translated values for title, tagline and overview. API docs: https://trakt.docs.apiary.io/#reference/episodes/translations/get-all-episode-translations
func (*ShowsService) GetAllEpisodesForSingleSeason ¶ added in v1.12.0
func (s *ShowsService) GetAllEpisodesForSingleSeason(ctx context.Context, id *string, season *int, opts *uri.ListOptions) ([]*str.Episode, *str.Response, error)
GetAllEpisodesForSingleSeason Returns a single seasons for a show. API docs: https://trakt.docs.apiary.io/#reference/seasons/episodes/get-all-episodes-for-a-single-season
func (*ShowsService) GetAllPeopleForEpisode ¶ added in v1.13.0
func (s *ShowsService) GetAllPeopleForEpisode(ctx context.Context, id *string, season *int, episode *int, opts *uri.ListOptions) (*str.EpisodePeople, *str.Response, error)
GetAllPeopleForEpisode Returns all cast and crew for an episode. Each cast member will have a characters array and a standard person object.
API docs: https://trakt.docs.apiary.io/#reference/episodes/people/get-all-people-for-an-episode
func (*ShowsService) GetAllPeopleForSeason ¶ added in v1.12.0
func (s *ShowsService) GetAllPeopleForSeason(ctx context.Context, id *string, season *int, opts *uri.ListOptions) (*str.SeasonPeople, *str.Response, error)
GetAllPeopleForSeason Returns all cast and crew for a season. Each cast member will have a characters array and a standard person object.
API docs: https://trakt.docs.apiary.io/#reference/seasons/people/get-all-people-for-a-season
func (*ShowsService) GetAllSeasonComments ¶ added in v1.12.0
func (s *ShowsService) GetAllSeasonComments(ctx context.Context, id *string, season *int, sort *string, opts *uri.ListOptions) ([]*str.Comment, *str.Response, error)
GetAllSeasonComments Returns all top level comments for a season. By default, the newest comments are returned first. Other sorting options include oldest, most likes, most replies, highest rated, lowest rated, and most plays..
API docs: https://trakt.docs.apiary.io/#reference/seasons/comments/get-all-season-comments
func (*ShowsService) GetAllSeasonTranslations ¶ added in v1.12.0
func (s *ShowsService) GetAllSeasonTranslations(ctx context.Context, id *string, season *int, language *string, opts *uri.ListOptions) ([]*str.Translation, *str.Response, error)
GetAllSeasonTranslations Returns all translations for an season, including language and translated values for title and overview. API docs: https://trakt.docs.apiary.io/#reference/seasons/episodes/get-all-season-translations
func (*ShowsService) GetAllSeasonsForShow ¶ added in v1.12.0
func (s *ShowsService) GetAllSeasonsForShow(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Season, *str.Response, error)
GetAllSeasonsForShow Returns all seasons for a show including the number of episodes in each season. API docs: https://trakt.docs.apiary.io/#reference/seasons/summary/get-all-seasons-for-a-show
func (*ShowsService) GetAllShowAliases ¶ added in v1.10.0
func (s *ShowsService) GetAllShowAliases(ctx context.Context, id *string) ([]*str.Alias, *str.Response, error)
GetAllShowAliases Returns all title aliases for a show. Includes country where name is different. API docs: https://trakt.docs.apiary.io/#reference/shows/aliases/get-all-show-aliases
func (*ShowsService) GetAllShowCertifications ¶ added in v1.10.0
func (s *ShowsService) GetAllShowCertifications(ctx context.Context, id *string) ([]*str.Certification, *str.Response, error)
GetAllShowCertifications Returns all content certifications for a show, including the country. API docs: https://trakt.docs.apiary.io/#reference/shows/certifications/get-all-show-certifications
func (*ShowsService) GetAllShowComments ¶ added in v1.10.0
func (s *ShowsService) GetAllShowComments(ctx context.Context, id *string, sort *string, opts *uri.ListOptions) ([]*str.Comment, *str.Response, error)
GetAllShowComments Returns all top level comments for a show. By default, the newest comments are returned first. Other sorting options include oldest, most likes, most replies, highest rated, lowest rated, and most plays.. API docs: https://trakt.docs.apiary.io/#reference/shows/comments/get-all-show-comments
func (*ShowsService) GetAllShowTranslations ¶ added in v1.10.0
func (s *ShowsService) GetAllShowTranslations(ctx context.Context, id *string, language *string) ([]*str.Translation, *str.Response, error)
GetAllShowTranslations Returns all translations for a show, including language and translated values for title, tagline and overview. API docs: https://trakt.docs.apiary.io/#reference/shows/translations/get-all-show-translations
func (*ShowsService) GetAnticipatedShows ¶ added in v1.10.0
func (s *ShowsService) GetAnticipatedShows(ctx context.Context, opts *uri.ListOptions) ([]*str.ShowsItem, *str.Response, error)
GetAnticipatedShows Returns the most anticipated shows based on the number of lists a show appears on. API docs: https://trakt.docs.apiary.io/#reference/shows/anticipated/get-the-most-anticipated-shows
func (*ShowsService) GetCollectedShows ¶ added in v1.10.0
func (s *ShowsService) GetCollectedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
GetCollectedShows Returns the most collected (unique users) shows in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/shows/collected/get-the-most-collected-shows
func (*ShowsService) GetEpisodeRatings ¶ added in v1.13.0
func (s *ShowsService) GetEpisodeRatings(ctx context.Context, id *string, season *int, episode *int) (*str.EpisodeRatings, *str.Response, error)
GetEpisodeRatings Returns rating (between 0 and 10) and distribution for an episode.
API docs: https://trakt.docs.apiary.io/#reference/episodes/ratings/get-episode-ratings
func (*ShowsService) GetEpisodeStats ¶ added in v1.13.0
func (s *ShowsService) GetEpisodeStats(ctx context.Context, id *string, season *int, episode *int) (*str.EpisodeStats, *str.Response, error)
GetEpisodeStats Returns lots of episode stats.
API docs: https://trakt.docs.apiary.io/#reference/episodes/stats/get-episode-stats
func (*ShowsService) GetEpisodeVideos ¶ added in v1.13.0
func (s *ShowsService) GetEpisodeVideos(ctx context.Context, id *string, season *int, episode *int, opts *uri.ListOptions) ([]*str.Video, *str.Response, error)
GetEpisodeVideos Returns all videos including trailers, teasers, clips, and featurettes.
API docs: https://trakt.docs.apiary.io/#reference/episodes/videos/get-all-videos
func (*ShowsService) GetEpisodesWatching ¶ added in v1.13.0
func (s *ShowsService) GetEpisodesWatching(ctx context.Context, id *string, season *int, episode *int, opts *uri.ListOptions) ([]*str.UserProfile, *str.Response, error)
GetEpisodesWatching Returns all users watching this episode right now.
API docs: https://trakt.docs.apiary.io/#reference/episodes/watching/get-users-watching-right-now
func (*ShowsService) GetFavoritedShows ¶ added in v1.10.0
func (s *ShowsService) GetFavoritedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
GetFavoritedShows Returns the most favorited shows in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/shows/favorited/get-favorited-shows
func (*ShowsService) GetLastEpisode ¶ added in v1.10.0
func (s *ShowsService) GetLastEpisode(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Episode, *str.Response, error)
GetLastEpisode Returns the most recently aired episode. API docs: https://trakt.docs.apiary.io/#reference/shows/last-episode/get-last-episode
func (*ShowsService) GetListsContainingEpisode ¶ added in v1.13.0
func (s *ShowsService) GetListsContainingEpisode(ctx context.Context, id *string, season *int, episode *int, t *string, sort *string, opts *uri.ListOptions) ([]*str.PersonalList, *str.Response, error)
GetListsContainingEpisode Returns all lists that contain this episode. By default, personal lists are returned sorted by the most popular.
API docs: https://trakt.docs.apiary.io/#reference/episodes/lists/get-lists-containing-this-episode
func (*ShowsService) GetListsContainingSeason ¶ added in v1.12.0
func (s *ShowsService) GetListsContainingSeason(ctx context.Context, id *string, season *int, t *string, sort *string, opts *uri.ListOptions) ([]*str.PersonalList, *str.Response, error)
GetListsContainingSeason Returns all lists that contain this season. By default, personal lists are returned sorted by the most popular.
API docs: https://trakt.docs.apiary.io/#reference/seasons/lists/get-lists-containing-this-season
func (*ShowsService) GetListsContainingShow ¶ added in v1.10.0
func (s *ShowsService) GetListsContainingShow(ctx context.Context, id *string, t *string, sort *string, opts *uri.ListOptions) ([]*str.PersonalList, *str.Response, error)
GetListsContainingShow Returns all lists that contain this show. By default, personal lists are returned sorted by the most popular. API docs: https://trakt.docs.apiary.io/#reference/shows/lists/get-lists-containing-this-show
func (*ShowsService) GetNextEpisode ¶ added in v1.10.0
func (s *ShowsService) GetNextEpisode(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Episode, *str.Response, error)
GetNextEpisode Returns the next scheduled to air episode. API docs: https://trakt.docs.apiary.io/#reference/shows/next-episode/get-next-episode
func (*ShowsService) GetPlayedShows ¶ added in v1.10.0
func (s *ShowsService) GetPlayedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
GetPlayedShows Returns the most played (a single user can watch multiple episode multiple times) shows in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/shows/played/get-the-most-played-shows
func (*ShowsService) GetPopularShows ¶ added in v1.10.0
func (s *ShowsService) GetPopularShows(ctx context.Context, opts *uri.ListOptions) ([]*str.Show, *str.Response, error)
GetPopularShows Returns the most popular shows. Popularity is calculated using the rating percentage and the number of ratings. API docs: https://trakt.docs.apiary.io/#reference/shows/popular/get-popular-shows
func (*ShowsService) GetRecentlyUpdatedShows ¶ added in v1.10.0
func (s *ShowsService) GetRecentlyUpdatedShows(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*str.ShowsItem, *str.Response, error)
GetRecentlyUpdatedShows Returns all shows updated since the specified UTC date and time. API docs: https://trakt.docs.apiary.io/#reference/shows/updates/get-recently-updated-shows
func (*ShowsService) GetRecentlyUpdatedShowsTraktIDs ¶ added in v1.10.0
func (s *ShowsService) GetRecentlyUpdatedShowsTraktIDs(ctx context.Context, startDate *string, opts *uri.ListOptions) ([]*int, *str.Response, error)
GetRecentlyUpdatedShowsTraktIDs Returns all show Trakt IDs updated since the specified UTC date and time. API docs: https://trakt.docs.apiary.io/#reference/shows/updated-ids/get-recently-updated-show-trakt-ids
func (*ShowsService) GetRelatedShows ¶ added in v1.10.0
func (s *ShowsService) GetRelatedShows(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Show, *str.Response, error)
GetRelatedShows Returns related and similar shows. API docs: https://trakt.docs.apiary.io/#reference/shows/related/get-related-shows
func (*ShowsService) GetSeasonRatings ¶ added in v1.12.0
func (s *ShowsService) GetSeasonRatings(ctx context.Context, id *string, season *int) (*str.SeasonRatings, *str.Response, error)
GetSeasonRatings Returns rating (between 0 and 10) and distribution for a season.
API docs: https://trakt.docs.apiary.io/#reference/seasons/ratings/get-season-ratings
func (*ShowsService) GetSeasonStats ¶ added in v1.12.0
func (s *ShowsService) GetSeasonStats(ctx context.Context, id *string, season *int) (*str.SeasonStats, *str.Response, error)
GetSeasonStats Returns lots of season stats.
API docs: https://trakt.docs.apiary.io/#reference/seasons/stats/get-season-stats
func (*ShowsService) GetSeasonsVideos ¶ added in v1.12.0
func (s *ShowsService) GetSeasonsVideos(ctx context.Context, id *string, season *int, opts *uri.ListOptions) ([]*str.Video, *str.Response, error)
GetSeasonsVideos Returns all videos including trailers, teasers, clips, and featurettes.
API docs: https://trakt.docs.apiary.io/#reference/seasons/videos/get-all-videos
func (*ShowsService) GetSeasonsWatching ¶ added in v1.12.0
func (s *ShowsService) GetSeasonsWatching(ctx context.Context, id *string, season *int, opts *uri.ListOptions) ([]*str.UserProfile, *str.Response, error)
GetSeasonsWatching Returns all users watching this season right now.
API docs: https://trakt.docs.apiary.io/#reference/seasons/watching/get-users-watching-right-now
func (*ShowsService) GetShow ¶ added in v1.5.0
func (s *ShowsService) GetShow(ctx context.Context, id *string, opts *uri.ListOptions) (*str.Show, *str.Response, error)
GetShow Returns episode object.
func (*ShowsService) GetShowCollectionProgress ¶ added in v1.10.0
func (s *ShowsService) GetShowCollectionProgress(ctx context.Context, id *string, opts *uri.ListOptions) (*str.CollectionProgress, error)
GetShowCollectionProgress Returns collection progress for a show including details on all aired seasons and episodes. API docs: https://trakt.docs.apiary.io/#reference/shows/collection-progress/get-show-collection-progress
func (*ShowsService) GetShowRatings ¶ added in v1.10.0
func (s *ShowsService) GetShowRatings(ctx context.Context, id *string) (*str.ShowRatings, *str.Response, error)
GetShowRatings Returns rating (between 0 and 10) and distribution for a show. API docs: https://trakt.docs.apiary.io/#reference/shows/ratings/get-show-ratings
func (*ShowsService) GetShowStats ¶ added in v1.10.0
func (s *ShowsService) GetShowStats(ctx context.Context, id *string) (*str.ShowStats, *str.Response, error)
GetShowStats Returns lots of show stats. API docs: https://trakt.docs.apiary.io/#reference/shows/stats/get-show-stats
func (*ShowsService) GetShowStudios ¶ added in v1.10.0
func (s *ShowsService) GetShowStudios(ctx context.Context, id *string) ([]*str.Studio, *str.Response, error)
GetShowStudios Returns all studios for show. API docs: https://trakt.docs.apiary.io/#reference/shows/studios/get-show-studios
func (*ShowsService) GetShowVideos ¶ added in v1.10.0
func (s *ShowsService) GetShowVideos(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.Video, *str.Response, error)
GetShowVideos Returns all videos including trailers, teasers, clips, and featurettes. API docs: https://trakt.docs.apiary.io/#reference/shows/videos/get-all-videos
func (*ShowsService) GetShowWatchedProgress ¶ added in v1.10.0
func (s *ShowsService) GetShowWatchedProgress(ctx context.Context, id *string, opts *uri.ListOptions) (*str.WatchedProgress, error)
GetShowWatchedProgress Returns watched progress for a show including details on all aired seasons and episodes. API docs: https://trakt.docs.apiary.io/#reference/shows/watched-progress/get-show-watched-progress
func (*ShowsService) GetShowWatching ¶ added in v1.10.0
func (s *ShowsService) GetShowWatching(ctx context.Context, id *string, opts *uri.ListOptions) ([]*str.UserProfile, *str.Response, error)
GetShowWatching Returns all users watching this show right now. API docs: https://trakt.docs.apiary.io/#reference/shows/studios/get-users-watching-right-now
func (*ShowsService) GetSingleEpisodeForShow ¶ added in v1.13.0
func (s *ShowsService) GetSingleEpisodeForShow(ctx context.Context, id *string, season *int, episode *int, opts *uri.ListOptions) (*str.Episode, *str.Response, error)
GetSingleEpisodeForShow Returns a single episode's details.
API docs: https://trakt.docs.apiary.io/#reference/episodes/summary/get-a-single-episode-for-a-show
func (*ShowsService) GetSingleSeasonsForShow ¶ added in v1.12.0
func (s *ShowsService) GetSingleSeasonsForShow(ctx context.Context, id *string, season *int, opts *uri.ListOptions) (*str.Season, *str.Response, error)
GetSingleSeasonsForShow Returns a single seasons for a show. API docs: https://trakt.docs.apiary.io/#reference/seasons/season/get-single-seasons-for-a-show
func (*ShowsService) GetTrendingShows ¶ added in v1.10.0
func (s *ShowsService) GetTrendingShows(ctx context.Context, opts *uri.ListOptions) ([]*str.ShowsItem, *str.Response, error)
GetTrendingShows Returns the most watched shows over the last 24 hours. Shows with the most watchers are returned first. API docs: https://trakt.docs.apiary.io/#reference/shows/trending/get-trending-shows
func (*ShowsService) GetWatchedShows ¶ added in v1.10.0
func (s *ShowsService) GetWatchedShows(ctx context.Context, opts *uri.ListOptions, period *string) ([]*str.ShowsItem, *str.Response, error)
GetWatchedShows Returns the most watched (unique users) shows in the specified time period, defaulting to weekly. All stats are relative to the specific time period. API docs: https://trakt.docs.apiary.io/#reference/shows/watched/get-the-most-watched-shows
func (*ShowsService) RefreshShowMetadata ¶ added in v1.10.0
RefreshShowMetadata Queue this show for a full metadata and image refresh. It might take up to 8 hours for the updated metadata to be availabe through the API. API docs: https://trakt.docs.apiary.io/#reference/shows/refresh/refresh-show-metadata
func (*ShowsService) ResetShowProgress ¶ added in v1.10.0
func (s *ShowsService) ResetShowProgress(ctx context.Context, id *string, progress *str.WatchedProgress) (*str.WatchedProgress, *str.Response, error)
ResetShowProgress Reset a show's progress when the user started re-watching the show. API docs:https://trakt.docs.apiary.io/#reference/shows/reset-watched-progress/reset-show-progress
func (*ShowsService) UndoResetShowProgress ¶ added in v1.10.0
func (s *ShowsService) UndoResetShowProgress(ctx context.Context, id *string) (*str.Response, error)
UndoResetShowProgress Undo the reset and have watched progress use all watched history for the show. API docs:https://trakt.docs.apiary.io/#reference/shows/reset-watched-progress/undo-reset-show-progress
type SyncService ¶
type SyncService Service
SyncService handles communication with the sync related methods of the Trakt API.
func (*SyncService) AddItemsToCollection ¶ added in v1.14.0
func (s *SyncService) AddItemsToCollection(ctx context.Context, items *str.ItemsList) (*str.CollectionAddResult, error)
AddItemsToCollection add items to user's collection
API docs:https://trakt.docs.apiary.io/#reference/sync/add-to-collection/add-items-to-collection
func (*SyncService) AddItemsToFavorites ¶ added in v1.14.0
func (s *SyncService) AddItemsToFavorites(ctx context.Context, items *str.HistoryItems) (*str.AddResult, error)
AddItemsToFavorites add items to favorites.
API docs:https://trakt.docs.apiary.io/#reference/sync/update-favorites/add-items-to-favorites
func (*SyncService) AddItemsToHistory ¶ added in v1.14.0
func (s *SyncService) AddItemsToHistory(ctx context.Context, items *str.HistoryItems) (*str.AddResult, error)
AddItemsToHistory add items to user's history
API docs:https://trakt.docs.apiary.io/#reference/sync/add-to-history/add-items-to-watched-history
func (*SyncService) AddItemsToRatings ¶ added in v1.14.0
func (s *SyncService) AddItemsToRatings(ctx context.Context, items *str.RatingItems) (*str.AddResult, error)
AddItemsToRatings Rate one or more items. Accepts shows, seasons, episodes and movies.
API docs:https://trakt.docs.apiary.io/#reference/sync/add-ratings/add-new-ratings
func (*SyncService) AddItemsToWatchlist ¶ added in v1.14.0
func (s *SyncService) AddItemsToWatchlist(ctx context.Context, items *str.HistoryItems) (*str.AddResult, error)
AddItemsToWatchlist Add one of more items to a user's watchlist. Accepts shows, seasons, episodes and movies. If only a show is passed, only the show itself will be added. If seasons are specified, all of those seasons will be added.
API docs:https://trakt.docs.apiary.io/#reference/sync/update-watchlist/add-items-to-watchlist
func (*SyncService) GetCollectedSeasons ¶ added in v1.14.0
func (s *SyncService) GetCollectedSeasons(ctx context.Context, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetCollectedSeasons dedicated function do prepare collection: seasons format
func (*SyncService) GetCollection ¶
func (s *SyncService) GetCollection(ctx context.Context, types *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetCollection Get all collected items in a user's collection.
API docs: https://trakt.docs.apiary.io/#reference/sync/get-collection/get-collection
func (*SyncService) GetFavorites ¶ added in v1.14.0
func (s *SyncService) GetFavorites(ctx context.Context, types *string, sortBy *string, sortHow *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetFavorites Returns all items in a user's favorites filtered by type.
API docs: https://trakt.docs.apiary.io/#reference/sync/get-favorites/get-favorites
func (*SyncService) GetLastActivity ¶ added in v1.14.0
func (s *SyncService) GetLastActivity(ctx context.Context) (*str.UserLastActivities, *str.Response, error)
GetLastActivity Returns trakt user activity.
API docs: https://trakt.docs.apiary.io/#reference/sync/last-activities/get-last-activity
func (*SyncService) GetPlaybackProgress ¶ added in v1.14.0
func (s *SyncService) GetPlaybackProgress(ctx context.Context, types *string, opts *uri.ListOptions) ([]*str.PlaybackProgress, *str.Response, error)
GetPlaybackProgress Returns playback progress.
API docs:https://trakt.docs.apiary.io/#reference/sync/playback/get-playback-progress
func (*SyncService) GetRatings ¶ added in v1.14.0
func (s *SyncService) GetRatings(ctx context.Context, types *string, rating *string, opts *uri.ListOptions) ([]*str.RatingListItem, *str.Response, error)
GetRatings Returns users ratings.
API docs: https://trakt.docs.apiary.io/#reference/sync/get-ratings/get-ratings
func (*SyncService) GetWatched ¶ added in v1.14.0
func (s *SyncService) GetWatched(ctx context.Context, watchType *string, opts *uri.ListOptions) ([]*str.UserWatched, *str.Response, error)
GetWatched Returns all movies or shows a user has watched sorted by most plays.
API docs:https://trakt.docs.apiary.io/#reference/sync/get-watched/get-watched
func (*SyncService) GetWatchedHistory ¶
func (s *SyncService) GetWatchedHistory(ctx context.Context, id *int, types *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetWatchedHistory Returns movies and episodes that a user has watched, sorted by most recent.
API docs: https://trakt.docs.apiary.io/#reference/sync/get-watched/get-watched-history
func (*SyncService) GetWatchlist ¶
func (s *SyncService) GetWatchlist(ctx context.Context, types *string, sortBy *string, sortHow *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetWatchlist Returns all items in a user's watchlist filtered by type.
API docs: https://trakt.docs.apiary.io/#reference/sync/get-watchlist/get-watchlist
func (*SyncService) RemoveItemsFromCollection ¶ added in v1.14.0
func (s *SyncService) RemoveItemsFromCollection(ctx context.Context, items *str.ItemsList) (*str.CollectionRemoveResult, error)
RemoveItemsFromCollection remove items from user's collection
API docs:https://trakt.docs.apiary.io/#reference/sync/remove-from-collection/remove-items-from-collection
func (*SyncService) RemoveItemsFromFavorites ¶ added in v1.14.0
func (s *SyncService) RemoveItemsFromFavorites(context context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
RemoveItemsFromFavorites remove items from favorites.
API docs: https://trakt.docs.apiary.io/#reference/sync/remove-from-favorites/remove-items-from-favorites
func (*SyncService) RemoveItemsFromHistory ¶ added in v1.14.0
func (s *SyncService) RemoveItemsFromHistory(ctx context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
RemoveItemsFromHistory remove items from user's history
API docs:https://trakt.docs.apiary.io/#reference/sync/remove-from-history/remove-items-from-history
func (*SyncService) RemoveItemsFromRatings ¶ added in v1.14.0
func (s *SyncService) RemoveItemsFromRatings(ctx context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
RemoveItemsFromRatings Remove ratings for one or more items.
API docs:https://trakt.docs.apiary.io/#reference/sync/remove-ratings/remove-ratings
func (*SyncService) RemoveItemsFromWatchlist ¶ added in v1.14.0
func (s *SyncService) RemoveItemsFromWatchlist(context context.Context, items *str.ItemsToRemove) (*str.RemoveResult, error)
RemoveItemsFromWatchlist Remove one or more items from a user's watchlist.
API docs:https://trakt.docs.apiary.io/#reference/sync/remove-from-watchlist/remove-items-from-watchlist
func (*SyncService) RemovePlaybackItem ¶ added in v1.14.0
RemovePlaybackItem removes playback item with selected id
API docs:https://trakt.docs.apiary.io/#reference/sync/remove-playback/remove-a-playback-item
func (*SyncService) ReorderFavoritesItems ¶ added in v1.14.0
func (s *SyncService) ReorderFavoritesItems(ctx context.Context, reorder *str.ItemsToReorder) (*str.ReorderResults, error)
ReorderFavoritesItems Reorder all items on a user's favorites by sending the updated rank of list item ids. Use the /sync/favorites method to get all list item ids.
API docs:https://trakt.docs.apiary.io/#reference/sync/reorder-favorites/reorder-favorited-items
func (*SyncService) ReorderWatchlistItems ¶ added in v1.14.0
func (s *SyncService) ReorderWatchlistItems(ctx context.Context, reorder *str.ItemsToReorder) (*str.ReorderResults, error)
ReorderWatchlistItems Reorder all items on a user's watchlist by sending the updated rank of list item ids. Use the /sync/watchlist method to get all list item ids.
API docs:https://trakt.docs.apiary.io/#reference/sync/reorder-watchlist/reorder-watchlist-items
func (*SyncService) UpdateFavoriteItem ¶ added in v1.14.0
func (s *SyncService) UpdateFavoriteItem(context context.Context, itemID int, update *str.FavoriteItem) error
UpdateFavoriteItem Update the notes on a single favorite item.
API docs: https://trakt.docs.apiary.io/#reference/sync/update-favorite-item/update-a-favorite-item
func (*SyncService) UpdateFavorites ¶ added in v1.14.0
func (s *SyncService) UpdateFavorites(context context.Context, update *str.PersonalList) (*str.PersonalList, error)
UpdateFavorites Update the favorites list by sending 1 or more parameters.
API docs:https://trakt.docs.apiary.io/#reference/sync/update-favorites/update-favorites
func (*SyncService) UpdateWatchlist ¶ added in v1.14.0
func (s *SyncService) UpdateWatchlist(ctx context.Context, update *str.PersonalList) (*str.PersonalList, error)
UpdateWatchlist Update the watchlist by sending 1 or more parameters.
API docs:https://trakt.docs.apiary.io/#reference/sync/update-watchlist/update-watchlist
func (*SyncService) UpdateWatchlistItem ¶ added in v1.14.0
func (s *SyncService) UpdateWatchlistItem(context context.Context, itemID int, update *str.WatchlistItem) error
UpdateWatchlistItem Update the notes on a single watchlist item.
API docs:https://trakt.docs.apiary.io/#reference/sync/update-watchlist-item/update-a-watchlist-item
type UpgradeRequiredError ¶ added in v1.1.0
type UpgradeRequiredError struct {
Response *http.Response
UpgradeURL *url.URL
Message string `json:"message"`
}
UpgradeRequiredError occurs when trakt.tv returns 426 user must upgrade to vip header
func (*UpgradeRequiredError) Error ¶ added in v1.1.0
func (r *UpgradeRequiredError) Error() string
type UpgradeUserLimitsError ¶ added in v1.15.0
type UpgradeUserLimitsError struct {
Response *http.Response
RetryAfter *time.Duration
Message string `json:"message"`
}
UpgradeUserLimitsError occurs when trakt.tv returns 420 requests header
func (*UpgradeUserLimitsError) Error ¶ added in v1.15.0
func (r *UpgradeUserLimitsError) Error() string
type UsersService ¶
type UsersService Service
UsersService handles communication with the users related methods of the Trakt API.
func (*UsersService) AddHiddenItems ¶ added in v1.15.0
func (u *UsersService) AddHiddenItems(ctx context.Context, items *str.HistoryItems, section string) (*str.AddResult, error)
AddHiddenItems Hide items for a specific section. Here's what type of items can hidden for each section. You can optionally specify the hidden_at date for each item. API docs:https://trakt.docs.apiary.io/#reference/users/add-hidden-items/add-hidden-items
func (*UsersService) AddListItems ¶ added in v1.15.0
func (u *UsersService) AddListItems(ctx context.Context, user *string, listID *string, items *str.HistoryItems) (*str.AddResult, *str.Response, error)
AddListItems Add one or more items to a personal list. Items can be movies, shows, seasons, episodes, or people. API docs:https://trakt.docs.apiary.io/#reference/users/add-list-items/add-items-to-personal-list
func (*UsersService) AddPersonalList ¶ added in v1.15.0
func (u *UsersService) AddPersonalList(ctx context.Context, user *string, list *str.PersonalList) (*str.PersonalList, *str.Response, error)
AddPersonalList Create a new personal list. The name is the only required field, but the other info is recommended to ask for. API docs:https://trakt.docs.apiary.io/#reference/users/lists/create-personal-list
func (*UsersService) ApproveFollowRequest ¶ added in v1.15.0
func (u *UsersService) ApproveFollowRequest(ctx context.Context, request int) (*str.FollowRequest, *str.Response, error)
ApproveFollowRequest Approve a follower using the id of the request. If the id is not found, was already approved, or was already denied, a 404 error will be returned. API docs:https://trakt.docs.apiary.io/#reference/users/approve-or-deny-follower-requests/approve-follow-request
func (*UsersService) Block ¶ added in v1.15.0
Block Block a user. If they are already following you, they will be removed from your followers. Any pending follow request from this user will be blocked, preventing them from following you in the future until you unblock them. API docs:https://trakt.docs.apiary.io/#reference/users/block/block-this-user
func (*UsersService) DeleteList ¶ added in v1.15.0
func (u *UsersService) DeleteList(ctx context.Context, user *string, listID *string) (*str.Response, error)
DeleteList Remove a personal list and all items it contains. API docs:https://trakt.docs.apiary.io/#reference/users/list/delete-a-user's-personal-list
func (*UsersService) DenyFollowRequest ¶ added in v1.15.0
func (u *UsersService) DenyFollowRequest(ctx context.Context, request int) (*str.FollowRequest, *str.Response, error)
DenyFollowRequest Deny a follower using the id of the request. If the id is not found, was already approved, or was already denied, a 404 error will be returned.
func (*UsersService) Follow ¶ added in v1.15.0
func (u *UsersService) Follow(ctx context.Context, user *string) (*str.FollowResult, *str.Response, error)
Follow If the user has a private profile, the follow request will require approval (approved_at will be null). If a user is public, they will be followed immediately (approved_at will have a date). API docs:https://trakt.docs.apiary.io/#reference/users/follow/follow-this-user
func (*UsersService) GetBlockedUsers ¶ added in v1.15.0
func (u *UsersService) GetBlockedUsers(ctx context.Context, options *uri.ListOptions) ([]*str.UserBlocked, *str.Response, error)
GetBlockedUsers Returns all users you have blocked, including when each user was blocked. API docs:https://trakt.docs.apiary.io/#reference/users/blocked-users/get-blocked-users
func (*UsersService) GetCollaborations ¶ added in v1.15.0
func (u *UsersService) GetCollaborations(ctx context.Context, user *string, opts *uri.ListOptions) ([]*str.PersonalList, *str.Response, error)
GetCollaborations Returns all lists a user can collaborate on. This gives full access to add, remove, and re-order list items. It essentially works just like a list owned by the user, just make sure to use the correct list owner user when building the API URLs. API docs:https://trakt.docs.apiary.io/#reference/users/collaborations/get-all-lists-a-user-can-collaborate-on
func (*UsersService) GetCollection ¶ added in v1.15.0
func (u *UsersService) GetCollection(ctx context.Context, user *string, stype *string, opts *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetCollection Get all collected items in a user's collection. A collected item indicates availability to watch digitally or on physical media. API docs:https://trakt.docs.apiary.io/#reference/users/collection/get-collection
func (*UsersService) GetComments ¶ added in v1.15.0
func (u *UsersService) GetComments(ctx context.Context, user *string, commentType *string, strType *string, opts *uri.ListOptions) ([]*str.CommentItem, *str.Response, error)
GetComments Returns the most recently written comments for the user. You can optionally filter by the comment_type and media type to limit what gets returned. By default, only top level comments are returned. Set ?include_replies=true to return replies in addition to top level comments. Set ?include_replies=only to return only replies and no top level comments. API docs:https://trakt.docs.apiary.io/#reference/users/comments/get-comments
func (*UsersService) GetFavorites ¶ added in v1.15.0
func (u *UsersService) GetFavorites(ctx context.Context, user *string, strType *string, sortBy *string, sortHow *string, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetFavorites Returns the top 100 shows and movies a user has favorited. Apps should encourage user's to add favorites so the algorithm keeps getting better. API docs:https://trakt.docs.apiary.io/#reference/users/favorites/get-favorites
func (*UsersService) GetFavoritesComments ¶ added in v1.15.0
func (u *UsersService) GetFavoritesComments(ctx context.Context, user *string, sort *string, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetFavoritesComments Returns all top level comments for the favorites. By default, the comments are sorted by most likes. Other sorting options include likes_30, most replies, replies_30, most plays, highest rating, and added date. API docs:https://trakt.docs.apiary.io/#reference/users/favorites-comments/get-all-favorites-comments
func (*UsersService) GetFollowRequests ¶ added in v1.15.0
func (u *UsersService) GetFollowRequests(ctx context.Context, options *uri.ListOptions) ([]*str.FollowRequest, *str.Response, error)
GetFollowRequests List a user's pending follow requests so they can either approve or deny them. API docs:https://trakt.docs.apiary.io/#reference/users/follower-requests/get-follow-requests
func (*UsersService) GetFollowers ¶ added in v1.15.0
func (u *UsersService) GetFollowers(ctx context.Context, user *string, options *uri.ListOptions) ([]*str.Follower, *str.Response, error)
GetFollowers Returns all followers including when the relationship began. API docs:https://trakt.docs.apiary.io/#reference/users/followers/get-followers
func (*UsersService) GetFollowing ¶ added in v1.15.0
func (u *UsersService) GetFollowing(ctx context.Context, user *string, options *uri.ListOptions) ([]*str.Follower, *str.Response, error)
GetFollowing Returns all user's they follow including when the relationship began. API docs:https://trakt.docs.apiary.io/#reference/users/following/get-following
func (*UsersService) GetFriends ¶ added in v1.15.0
func (u *UsersService) GetFriends(ctx context.Context, user *string, options *uri.ListOptions) ([]*str.Friend, *str.Response, error)
GetFriends Returns all friends for a user including when the relationship began. Friendship is a 2 way relationship where each user follows the other. API docs:https://trakt.docs.apiary.io/#reference/users/friends/get-friends
func (*UsersService) GetHiddenItems ¶ added in v1.15.0
func (u *UsersService) GetHiddenItems(ctx context.Context, section *string, opts *uri.ListOptions) ([]*str.HiddenItem, *str.Response, error)
GetHiddenItems Get hidden items for a section. This will return an array of standard media objects. You can optionally limit the type of results to return.. API docs:https:https://trakt.docs.apiary.io/#reference/users/hidden-items/get-hidden-items
func (*UsersService) GetHistory ¶ added in v1.15.0
func (u *UsersService) GetHistory(ctx context.Context, user *string, strType *string, id *int, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetHistory Returns movies and episodes that a user has watched, sorted by most recent. You can optionally limit the type to movies or episodes. The id (64-bit integer) in each history item uniquely identifies the event and can be used to remove individual events by using the /sync/history/remove method. The action will be set to scrobble, checkin, or watch.Specify a type and trakt item_id to limit the history for just that item. If the item_id is valid, but there is no history, an empty array will be returned. API docs:https://trakt.docs.apiary.io/#reference/users/history/get-watched-history
func (*UsersService) GetItemstOnAPersonalList ¶
func (u *UsersService) GetItemstOnAPersonalList(ctx context.Context, id *string, listID *string, t *string) ([]*str.UserListItem, *str.Response, error)
GetItemstOnAPersonalList Get all items on a personal list.
API docs: https://trakt.docs.apiary.io/#reference/users/list-items/get-items-on-a-personal-list
func (*UsersService) GetLikes ¶ added in v1.15.0
func (u *UsersService) GetLikes(ctx context.Context, user *string, stype *string, opts *uri.ListOptions) ([]*str.UserLike, *str.Response, error)
GetLikes Get items a user likes. This will return an array of standard media objects. You can optionally limit the type of results to return. API docs:https://trakt.docs.apiary.io/#reference/users/likes/get-likes
func (*UsersService) GetList ¶ added in v1.15.0
func (u *UsersService) GetList(ctx context.Context, user *string, listID *string, opts *uri.ListOptions) (*str.PersonalList, *str.Response, error)
GetList Returns a single personal list. Use the /users/:id/lists/:list_id/items method to get the actual items this list contains. API docs:https://trakt.docs.apiary.io/#reference/users/list/get-personal-list
func (*UsersService) GetListComments ¶ added in v1.15.0
func (u *UsersService) GetListComments(ctx context.Context, user *string, listID *string, sort *string, options *uri.ListOptions) ([]*str.ListComment, *str.Response, error)
GetListComments Returns all top level comments for a list. By default, the comments are sorted by most likes. Other sorting options include likes_30, most replies, replies_30, most plays, highest rating, and added date. API docs:https://trakt.docs.apiary.io/#reference/users/list-comments/get-all-list-comments
func (*UsersService) GetListItems ¶ added in v1.15.0
func (u *UsersService) GetListItems(ctx context.Context, user *string, listID *string, strType *string, sortBy *string, sortHow *string, options *uri.ListOptions) ([]*str.UserListItem, *str.Response, error)
GetListItems Get all items on a personal list. Items can be a movie, show, season, episode, or person. You can optionally specify the type parameter with a single value or comma delimited string for multiple item types. API docs:https://trakt.docs.apiary.io/#reference/users/list-items/get-items-on-a-personal-list
func (*UsersService) GetListLikes ¶ added in v1.15.0
func (u *UsersService) GetListLikes(ctx context.Context, user *string, listID *string, opts *uri.ListOptions) ([]*str.UserLike, *str.Response, error)
GetListLikes Returns all users who liked a list. API docs:https://trakt.docs.apiary.io/#reference/users/list-likes/get-all-users-who-liked-a-list
func (*UsersService) GetNotes ¶ added in v1.15.0
func (u *UsersService) GetNotes(ctx context.Context, user *string, strType *string, opts *uri.ListOptions) ([]*str.NotesItem, *str.Response, error)
GetNotes Returns the most recently notes for the user. You can optionally filter by media type to limit what gets returned. Use the attached_to info to know what the note is actually added to. Media items like movie, show, season, episode, or person are straightforward, but history will need to be mapped to that specific play in their watched history since they might have multiple plays. Since collection and rating is a 1:1 association, you can assume the note is attached to the media item in the type field that has been collected or rated. API docs:https://trakt.docs.apiary.io/#reference/users/notes/get-notes
func (*UsersService) GetPendingFollowingRequests ¶ added in v1.15.0
func (u *UsersService) GetPendingFollowingRequests(ctx context.Context, options *uri.ListOptions) ([]*str.FollowRequest, *str.Response, error)
GetPendingFollowingRequests List a user's pending following requests that they're waiting for the other user's to approve. API docs:https://trakt.docs.apiary.io/#reference/users/following-requests/get-pending-following-requests
func (*UsersService) GetProfile ¶ added in v1.15.0
func (u *UsersService) GetProfile(ctx context.Context, s *string) (*str.UserProfile, *str.Response, error)
GetProfile Get a user's profile information. If the user is private, info will only be returned if you send OAuth and are either that user or an approved follower. Adding ?extended=vip will return some additional VIP related fields so you can display the user's Trakt VIP status and year count. API docs:https://trakt.docs.apiary.io/#reference/users/profile/get-user-profile
func (*UsersService) GetRatings ¶ added in v1.15.0
func (u *UsersService) GetRatings(ctx context.Context, user *string, strType *string, rating *string, options *uri.ListOptions) ([]*str.RatingListItem, *str.Response, error)
GetRatings Get a user's ratings filtered by type. You can optionally filter for a specific rating between 1 and 10. Send a comma separated string for rating if you need multiple ratings. API docs:https://trakt.docs.apiary.io/#reference/users/ratings/get-ratings
func (*UsersService) GetSavedFilters ¶ added in v1.1.0
func (u *UsersService) GetSavedFilters(ctx context.Context, section *string) ([]*str.SavedFilter, *str.Response, error)
GetSavedFilters Get all saved filters a users has created.
API docs: https://trakt.docs.apiary.io/#reference/users/saved-filters/get-saved-filters
func (*UsersService) GetStats ¶ added in v1.2.0
func (u *UsersService) GetStats(ctx context.Context, id *string) (*str.UserStats, *str.Response, error)
GetStats Returns stats about the movies, shows, and episodes a user has watched, collected, and rated.
API docs:https://trakt.docs.apiary.io/#reference/users/stats/get-stats
func (*UsersService) GetUserProfile ¶
func (u *UsersService) GetUserProfile(ctx context.Context, id *string) (*str.UserProfile, *str.Response, error)
GetUserProfile Get a user's profile information.
API docs:https://trakt.docs.apiary.io/#reference/users/profile/get-user-profile
func (*UsersService) GetUsersPersonalLists ¶
func (u *UsersService) GetUsersPersonalLists(ctx context.Context, id *string) ([]*str.PersonalList, *str.Response, error)
GetUsersPersonalLists Returns all personal lists for a user.
API docs: https://trakt.docs.apiary.io/#reference/users/lists/get-a-user's-personal-lists
func (*UsersService) GetWatched ¶ added in v1.3.0
func (u *UsersService) GetWatched(ctx context.Context, id *string, watchType *string, opts *uri.ListOptions) ([]*str.UserWatched, *str.Response, error)
GetWatched Returns all movies or shows a user has watched sorted by most plays.
API docs:https://trakt.docs.apiary.io/#reference/users/watched/get-watched
func (*UsersService) GetWatchlist ¶ added in v1.15.0
func (u *UsersService) GetWatchlist(ctx context.Context, user *string, types *string, sortBy *string, sortHow *string, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetWatchlist Returns all items in a user's watchlist filtered by type. API docs:https://trakt.docs.apiary.io/#reference/users/watchlist/get-watchlist
func (*UsersService) GetWatchlistComments ¶ added in v1.15.0
func (u *UsersService) GetWatchlistComments(ctx context.Context, user *string, sort *string, options *uri.ListOptions) ([]*str.ExportlistItem, *str.Response, error)
GetWatchlistComments Returns all top level comments for the watchlist. By default, the comments are sorted by most likes. Other sorting options include likes_30, most replies, replies_30, most plays, highest rating, and added date. API docs:https://trakt.docs.apiary.io/#reference/users/watchlist-comments/get-all-favorites-comments
func (*UsersService) ListLike ¶ added in v1.15.0
func (u *UsersService) ListLike(ctx context.Context, user *string, listID *string) (*str.Response, error)
ListLike Votes help determine popular lists. Only one like is allowed per list per user. API docs:https://trakt.docs.apiary.io/#reference/users/list-like/like-a-list
func (*UsersService) ListReport ¶ added in v1.15.0
func (u *UsersService) ListReport(ctx context.Context, user *string, listID *string, report *str.ListReport) (*str.ListReportResult, *str.Response, error)
ListReport Report a user's list for moderator review. Send a reason and optional message with additional context. A user can only have one pending report per list. API docs:https://trakt.docs.apiary.io/#reference/users/list-report/report-a-user's-list
func (*UsersService) RemoveHiddenItems ¶ added in v1.15.0
func (u *UsersService) RemoveHiddenItems(ctx context.Context, items *str.HistoryItems, section string) (*str.RemoveResult, error)
RemoveHiddenItems Unhide items for a specific section. Here's what type of items can unhidden for each section. API docs:https://trakt.docs.apiary.io/#reference/users/remove-hidden-items/remove-hidden-items
func (*UsersService) RemoveListItems ¶ added in v1.15.0
func (u *UsersService) RemoveListItems(ctx context.Context, user *string, listID *string, items *str.HistoryItems) (*str.RemoveResult, *str.Response, error)
RemoveListItems Remove one or more items from a personal list. API docs:https://trakt.docs.apiary.io/#reference/users/remove-list-items/remove-items-from-personal-list
func (*UsersService) RemoveListLike ¶ added in v1.15.0
func (u *UsersService) RemoveListLike(ctx context.Context, user *string, listID *string) (*str.Response, error)
RemoveListLike Remove a like on a list. API docs:https://trakt.docs.apiary.io/#reference/users/list-like/remove-like-on-a-list
func (*UsersService) ReorderListItems ¶ added in v1.15.0
func (u *UsersService) ReorderListItems(ctx context.Context, user *string, listID *string, items *str.ItemsToReorder) (*str.ReorderResults, *str.Response, error)
ReorderListItems Reorder all items on a list by sending the updated rank of list item ids. Use the /users/:id/lists/:list_id/items method to get all list item ids. API docs:https://trakt.docs.apiary.io/#reference/users/reorder-list-items/reorder-items-on-a-list
func (*UsersService) ReorderLists ¶ added in v1.15.0
func (u *UsersService) ReorderLists(ctx context.Context, user *string, items *str.ItemsToReorder) (*str.ReorderResults, *str.Response, error)
ReorderLists Reorder all lists by sending the updated rank of list ids. Use the /users/:id/lists method to get all list ids. API docs:https://trakt.docs.apiary.io/#reference/users/reorder-lists/reorder-a-user's-lists
func (*UsersService) Report ¶ added in v1.15.0
func (u *UsersService) Report(ctx context.Context, user *string, report *str.UserReport) (*str.UserReportResult, *str.Response, error)
Report Report a user for moderator review. Send a reason and optional message with additional context. A user can only have one pending report per reported user. API docs:https://trakt.docs.apiary.io/#reference/users/report/report-a-user
func (*UsersService) RetrieveSettings ¶ added in v1.5.0
func (u *UsersService) RetrieveSettings(ctx context.Context) (*str.UserSettings, *str.Response, error)
RetrieveSettings Get the user's settings so you can align your app's experience with what they're used to on the trakt website. API docs: https://trakt.docs.apiary.io/#reference/users/settings/retrieve-settings
func (*UsersService) Unblock ¶ added in v1.15.0
Unblock Unblock a user you previously blocked. API docs:https://trakt.docs.apiary.io/#reference/users/block/unblock-this-user
func (*UsersService) Unfollow ¶ added in v1.15.0
Unfollow Unfollow someone you already follow.. API docs:https://trakt.docs.apiary.io/#reference/users/follow/unfollow-this-user
func (*UsersService) UpdateList ¶ added in v1.15.0
func (u *UsersService) UpdateList(ctx context.Context, user *string, listID *string, update *str.PersonalList) (*str.PersonalList, *str.Response, error)
UpdateList Update a personal list by sending 1 or more parameters. If you update the list name, the original slug will still be retained so existing references to this list won't break. API docs:https://trakt.docs.apiary.io/#reference/users/list/update-personal-list
func (*UsersService) UpdateListItem ¶ added in v1.15.0
func (u *UsersService) UpdateListItem(ctx context.Context, user *string, listID *string, listItemID *int, item *str.PersonalListItem) (*str.Response, error)
UpdateListItem Update the notes on a single list item. API docs:https://trakt.docs.apiary.io/#reference/users/update-list-item/update-a-list-item
func (*UsersService) Watching ¶ added in v1.15.0
func (u *UsersService) Watching(ctx context.Context, user *string, options *uri.ListOptions) (*str.WatchingResult, *str.Response, error)
Watching Returns a movie or episode if the user is currently watching something. If they are not, it returns no data and a 204 HTTP status code. API docs:https://trakt.docs.apiary.io/#reference/users/watching/get-watching
type ValidationError ¶ added in v1.6.0
type ValidationError struct {
Response *http.Response
Message string `json:"message"`
Errors *str.Errors `json:"errors,omitempty"`
}
ValidationError occurs when trakt.tv returns 422 error
func (*ValidationError) Error ¶ added in v1.6.0
func (r *ValidationError) Error() string
Source Files
¶
- abuse_rate_limit_error.go
- bad_request_error.go
- calendars_service.go
- certifications_service.go
- checkin_service.go
- client.go
- comments_service.go
- conflict_error.go
- countries_service.go
- episodes_service.go
- forbidden_error.go
- genres_service.go
- helpers.go
- invalid_user_error.go
- languages_service.go
- lists_service.go
- movies_service.go
- networks_service.go
- not_found_error.go
- notes_service.go
- oauth_service.go
- people_service.go
- precondition_failed_request_error.go
- recommendations_service.go
- scrobble_service.go
- search_service.go
- seasons_service.go
- server_error.go
- service.go
- setup_data.go
- shows_service.go
- sync_service.go
- upgrade_required_error.go
- upgrade_user_limits_error.go
- users_service.go
- validation_error.go