Documentation
¶
Index ¶
- Constants
- Variables
- func AddToCollection(itemType string, tmdbID string) (req *reqapi.Request, err error)
- func AddToUserlist(listID int, itemType string, tmdbID string) (req *reqapi.Request, err error)
- func AddToWatchlist(itemType string, tmdbID string) (req *reqapi.Request, err error)
- func Authorize(fromSettings bool) error
- func Authorized() error
- func Deauthorize(fromSettings bool) error
- func GetAuthenticatedHeader() http.Header
- func GetAvailableHeader() http.Header
- func GetHeader() http.Header
- func GetHiddenShowsMap(section string) map[int]bool
- func NotifyLocked()
- func PaginatedRequest[T any](endPoint string, params napping.Params, isWithAuth bool, isUpdateNeeded bool, ...) ([]T, error)
- func RefreshToken() error
- func RemoveFromCollection(itemType string, tmdbID string) (req *reqapi.Request, err error)
- func RemoveFromUserlist(listID int, itemType string, tmdbID string) (req *reqapi.Request, err error)
- func RemoveFromWatchlist(itemType string, tmdbID string) (req *reqapi.Request, err error)
- func Request(endPoint string, params napping.Params, isWithAuth bool, isUpdateNeeded bool, ...) error
- func Scrobble(action string, contentType string, tmdbID int, watched float64, ...)
- func SetWatched(item *WatchedItem) (req *reqapi.Request, err error)
- func SyncAddedItem(itemType string, tmdbID string, location int) (req *reqapi.Request, err error)
- func SyncRemovedItem(itemType string, tmdbID string, location int) (req *reqapi.Request, err error)
- func TokenRefreshHandler()
- type Activities
- func (a *Activities) All() bool
- func (a *Activities) EpisodesCollected() bool
- func (a *Activities) EpisodesCommented() bool
- func (a *Activities) EpisodesPaused() bool
- func (a *Activities) EpisodesRated() bool
- func (a *Activities) EpisodesWatched() bool
- func (a *Activities) EpisodesWatchlisted() bool
- func (a *Activities) FavoritesUpdated() bool
- func (a *Activities) HasPrevious() bool
- func (a *Activities) ListsCommented() bool
- func (a *Activities) ListsLiked() bool
- func (a *Activities) ListsUpdated() bool
- func (a *Activities) MoviesCollected() bool
- func (a *Activities) MoviesCommented() bool
- func (a *Activities) MoviesFavorited() bool
- func (a *Activities) MoviesHidden() bool
- func (a *Activities) MoviesPaused() bool
- func (a *Activities) MoviesRated() bool
- func (a *Activities) MoviesWatched() bool
- func (a *Activities) MoviesWatchlisted() bool
- func (a *Activities) SaveCurrent() error
- func (a *Activities) SeasonsCommented() bool
- func (a *Activities) SeasonsHidden() bool
- func (a *Activities) SeasonsRated() bool
- func (a *Activities) SeasonsWatchlisted() bool
- func (a *Activities) ShowsCommented() bool
- func (a *Activities) ShowsFavorited() bool
- func (a *Activities) ShowsHidden() bool
- func (a *Activities) ShowsRated() bool
- func (a *Activities) ShowsWatchlisted() bool
- func (a *Activities) WatchlistUpdated() bool
- type Airs
- type CalendarMovie
- type CalendarShow
- type Code
- type CollectedEpisode
- type CollectedSeason
- type CollectionMovie
- type CollectionShow
- type Episode
- func GetEpisode(showID, seasonNumber, episodeNumber int) (episode *Episode)
- func GetEpisodeByID(id string) (episode *Episode)
- func GetEpisodeByTMDB(tmdbID string) (episode *Episode)
- func GetEpisodeByTVDB(tvdbID string) (episode *Episode)
- func GetSeasonEpisodes(showID, seasonNumber int) (episodes []*Episode)
- type EpisodeSearchResults
- type HiddenShow
- type HistoryResponse
- type HistoryResponseStats
- type IDs
- type List
- func (l *List) ID() int
- func (l *List) IsOfficial() bool
- func (l *List) IsOur() bool
- func (l *List) IsPersonal() bool
- func (l *List) IsPrivate() bool
- func (l *List) IsPublic() bool
- func (z *List) MarshalMsg(b []byte) (o []byte, err error)
- func (z *List) Msgsize() (s int)
- func (z *List) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (l *List) Username() string
- type ListActivities
- type ListContainer
- type ListItem
- type ListItemsPayload
- type Movie
- type MovieSearchResults
- type Movies
- func CollectionMovies(isUpdateNeeded bool) (movies []*Movies, err error)
- func DiffMovies(previous, current []*Movies) []*Movies
- func ListItemsMovies(user, listID string) (movies []*Movies, err error)
- func PreviousCollectionMovies() ([]*Movies, error)
- func PreviousListItemsMovies(listID string) ([]*Movies, error)
- func PreviousWatchlistMovies() ([]*Movies, error)
- func SearchMovies(query string, page string) (movies []*Movies, err error)
- func TopMovies(topCategory string, page string) (movies []*Movies, total int, err error)
- func WatchlistMovies(isUpdateNeeded bool) (movies []*Movies, err error)
- type Object
- type Pagination
- type PausedEpisode
- type PausedMovie
- type ProgressShow
- type Provider
- func (p *Provider) Add(loc tracker.Location, listID string, items []*tracker.Item) error
- func (p *Provider) Authorize() error
- func (p *Provider) Authorized() bool
- func (p *Provider) Collection(t tracker.MediaType, refresh bool) ([]*tracker.Item, error)
- func (p *Provider) Deauthorize() error
- func (p *Provider) Hidden(section string, refresh bool) ([]*tracker.Item, error)
- func (p *Provider) ID() string
- func (p *Provider) LastActivities() (*tracker.Activities, error)
- func (p *Provider) ListItems(listID string, t tracker.MediaType, refresh bool) ([]*tracker.Item, error)
- func (p *Provider) Lists() ([]*tracker.List, error)
- func (p *Provider) MinSyncInterval() time.Duration
- func (p *Provider) Name() string
- func (p *Provider) Paused(t tracker.MediaType, refresh bool) ([]*tracker.PausedItem, error)
- func (p *Provider) Progress(refresh bool) ([]*tracker.Item, error)
- func (p *Provider) RefreshToken() error
- func (p *Provider) Remove(loc tracker.Location, listID string, items []*tracker.Item) error
- func (p *Provider) Scrobble(action tracker.ScrobbleAction, item *tracker.Item, progress float64) error
- func (p *Provider) SetWatched(items []*tracker.WatchedItem, watched bool) error
- func (p *Provider) Watched(t tracker.MediaType, refresh bool) ([]*tracker.WatchedItem, error)
- func (p *Provider) Watchlist(t tracker.MediaType, refresh bool) ([]*tracker.Item, error)
- type Season
- type Show
- type ShowSearchResults
- type Shows
- func CollectionShows(isUpdateNeeded bool) (shows []*Shows, err error)
- func ListHiddenShows(section string, isUpdateNeeded bool) (shows []*Shows, err error)
- func ListItemsShows(user, listID string) (shows []*Shows, err error)
- func PreviousCollectionShows() ([]*Shows, error)
- func PreviousListItemsShows(listID string) ([]*Shows, error)
- func PreviousWatchlistShows() ([]*Shows, error)
- func SearchShows(query string, page string) (shows []*Shows, err error)
- func TopShows(topCategory string, page string) (shows []*Shows, total int, err error)
- func WatchlistShows(isUpdateNeeded bool) (shows []*Shows, err error)
- type Sizes
- type Token
- type TokenRefresh
- type User
- type UserActivities
- type UserSettings
- type WatchedEpisode
- type WatchedItem
- type WatchedMovie
- type WatchedMoviesType
- type WatchedProgressShow
- type WatchedSeason
- type WatchedShow
- type WatchedShowsType
- type Watchlist
- type WatchlistEpisode
- type WatchlistMovie
- type WatchlistSeason
- type WatchlistShow
Constants ¶
const ( // APIURL ... APIURL = "https://api.trakt.tv" // AuthURL is used for OAuth requests AuthURL = "https://auth.trakt.tv" // APIVersion ... APIVersion = "2" ListsPerPage = 150 )
const ( // ProgressSortWatched ... ProgressSortWatched = iota // ProgressSortShow ... ProgressSortShow // ProgressSortAiredNewer ... ProgressSortAiredNewer // ProgressSortAiredOlder ... ProgressSortAiredOlder )
Variables ¶
var ( // Cookies ... Cookies = "" // UserAgent ... UserAgent = "Elementum/" + ident.GetVersion() )
var ( // ErrLocked reflects Trakt account locked status ErrLocked = errors.New("Account is locked") )
Functions ¶
func AddToCollection ¶
AddToCollection ...
func AddToUserlist ¶
AddToUserlist ...
func AddToWatchlist ¶
AddToWatchlist ...
func GetAuthenticatedHeader ¶
func GetAvailableHeader ¶
func GetHiddenShowsMap ¶
GetHiddenShowsMap returns a map with hidden shows that can be used for filtering
func PaginatedRequest ¶ added in v0.1.114
func PaginatedRequest[T any](endPoint string, params napping.Params, isWithAuth bool, isUpdateNeeded bool, isCachePages bool, cacheExpiration time.Duration) ([]T, error)
PaginatedRequest is a general proxy for collecting all pages requests. ret must be a pointer to a slice (e.g., &[]*WatchedMovie). Results from each page are appended into the slice that ret points to.
func RemoveFromCollection ¶
RemoveFromCollection ...
func RemoveFromUserlist ¶
func RemoveFromUserlist(listID int, itemType string, tmdbID string) (req *reqapi.Request, err error)
RemoveFromUserlist ...
func RemoveFromWatchlist ¶
RemoveFromWatchlist ...
func Request ¶
func Request(endPoint string, params napping.Params, isWithAuth bool, isUpdateNeeded bool, cacheExpiration time.Duration, ret any) error
Request is a general proxy for making requests
func SetWatched ¶
func SetWatched(item *WatchedItem) (req *reqapi.Request, err error)
SetWatched adds and removes from watched history
func SyncAddedItem ¶
SyncAddedItem adds item (movie/show) to watchlist or collection
func SyncRemovedItem ¶
SyncRemovedItem removes item (movie/show) from watchlist or collection
func TokenRefreshHandler ¶
func TokenRefreshHandler()
TokenRefreshHandler refreshes token on timer if it is already expired or near to its expiration
Types ¶
type Activities ¶
type Activities struct {
Previous *UserActivities
Current *UserActivities
// contains filtered or unexported fields
}
func GetActivities ¶
func GetActivities(source string) (*Activities, error)
func (*Activities) All ¶
func (a *Activities) All() bool
func (*Activities) EpisodesCollected ¶
func (a *Activities) EpisodesCollected() bool
func (*Activities) EpisodesCommented ¶
func (a *Activities) EpisodesCommented() bool
func (*Activities) EpisodesPaused ¶
func (a *Activities) EpisodesPaused() bool
func (*Activities) EpisodesRated ¶
func (a *Activities) EpisodesRated() bool
func (*Activities) EpisodesWatched ¶
func (a *Activities) EpisodesWatched() bool
func (*Activities) EpisodesWatchlisted ¶
func (a *Activities) EpisodesWatchlisted() bool
func (*Activities) FavoritesUpdated ¶
func (a *Activities) FavoritesUpdated() bool
func (*Activities) HasPrevious ¶
func (a *Activities) HasPrevious() bool
func (*Activities) ListsCommented ¶
func (a *Activities) ListsCommented() bool
func (*Activities) ListsLiked ¶
func (a *Activities) ListsLiked() bool
func (*Activities) ListsUpdated ¶
func (a *Activities) ListsUpdated() bool
func (*Activities) MoviesCollected ¶
func (a *Activities) MoviesCollected() bool
func (*Activities) MoviesCommented ¶
func (a *Activities) MoviesCommented() bool
func (*Activities) MoviesFavorited ¶
func (a *Activities) MoviesFavorited() bool
func (*Activities) MoviesHidden ¶
func (a *Activities) MoviesHidden() bool
func (*Activities) MoviesPaused ¶
func (a *Activities) MoviesPaused() bool
func (*Activities) MoviesRated ¶
func (a *Activities) MoviesRated() bool
func (*Activities) MoviesWatched ¶
func (a *Activities) MoviesWatched() bool
func (*Activities) MoviesWatchlisted ¶
func (a *Activities) MoviesWatchlisted() bool
func (*Activities) SaveCurrent ¶
func (a *Activities) SaveCurrent() error
func (*Activities) SeasonsCommented ¶
func (a *Activities) SeasonsCommented() bool
func (*Activities) SeasonsHidden ¶
func (a *Activities) SeasonsHidden() bool
func (*Activities) SeasonsRated ¶
func (a *Activities) SeasonsRated() bool
func (*Activities) SeasonsWatchlisted ¶
func (a *Activities) SeasonsWatchlisted() bool
func (*Activities) ShowsCommented ¶
func (a *Activities) ShowsCommented() bool
func (*Activities) ShowsFavorited ¶
func (a *Activities) ShowsFavorited() bool
func (*Activities) ShowsHidden ¶
func (a *Activities) ShowsHidden() bool
func (*Activities) ShowsRated ¶
func (a *Activities) ShowsRated() bool
func (*Activities) ShowsWatchlisted ¶
func (a *Activities) ShowsWatchlisted() bool
func (*Activities) WatchlistUpdated ¶
func (a *Activities) WatchlistUpdated() bool
type Airs ¶
type Airs struct {
Day string `json:"day"`
Time string `json:"time"`
Timezone string `json:"timezone"`
}
Airs ...
func (Airs) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type CalendarMovie ¶
CalendarMovie ...
func CalendarMovies ¶
func CalendarMovies(endPoint string, page string, cacheExpire time.Duration, isUpdateNeeded bool) (movies []*CalendarMovie, total int, err error)
CalendarMovies ...
func (*CalendarMovie) MarshalMsg ¶ added in v0.1.115
func (z *CalendarMovie) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CalendarMovie) Msgsize ¶ added in v0.1.115
func (z *CalendarMovie) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CalendarMovie) UnmarshalMsg ¶ added in v0.1.115
func (z *CalendarMovie) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CalendarShow ¶
type CalendarShow struct {
FirstAired string `json:"first_aired"`
Episode *Episode `json:"episode"`
Show *Show `json:"show"`
}
CalendarShow ...
func CalendarShows ¶
func CalendarShows(endPoint string, page string, cacheExpire time.Duration, isUpdateNeeded bool) (shows []*CalendarShow, total int, err error)
CalendarShows ...
func (*CalendarShow) MarshalMsg ¶ added in v0.1.115
func (z *CalendarShow) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CalendarShow) Msgsize ¶ added in v0.1.115
func (z *CalendarShow) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CalendarShow) UnmarshalMsg ¶ added in v0.1.115
func (z *CalendarShow) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Code ¶
type Code struct {
DeviceCode string `json:"device_code"`
UserCode string `json:"user_code"`
VerificationURL string `json:"verification_url"`
ExpiresIn int `json:"expires_in"`
Interval int `json:"interval"`
}
Code ...
func (*Code) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type CollectedEpisode ¶
type CollectedEpisode struct {
CollectedAt time.Time `json:"collected_at"`
Number int `json:"number"`
}
CollectedEpisode ...
func (CollectedEpisode) MarshalMsg ¶ added in v0.1.115
func (z CollectedEpisode) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (CollectedEpisode) Msgsize ¶ added in v0.1.115
func (z CollectedEpisode) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CollectedEpisode) UnmarshalMsg ¶ added in v0.1.115
func (z *CollectedEpisode) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CollectedSeason ¶
type CollectedSeason struct {
Number int `json:"number"`
Episodes []*CollectedEpisode `json:"episodes"`
}
CollectedSeason ...
func (*CollectedSeason) MarshalMsg ¶ added in v0.1.115
func (z *CollectedSeason) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CollectedSeason) Msgsize ¶ added in v0.1.115
func (z *CollectedSeason) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CollectedSeason) UnmarshalMsg ¶ added in v0.1.115
func (z *CollectedSeason) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CollectionMovie ¶
type CollectionMovie struct {
CollectedAt time.Time `json:"collected_at"`
Movie *Movie `json:"movie"`
}
CollectionMovie ...
func (*CollectionMovie) MarshalMsg ¶ added in v0.1.115
func (z *CollectionMovie) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CollectionMovie) Msgsize ¶ added in v0.1.115
func (z *CollectionMovie) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CollectionMovie) UnmarshalMsg ¶ added in v0.1.115
func (z *CollectionMovie) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CollectionShow ¶
type CollectionShow struct {
CollectedAt time.Time `json:"last_collected_at"`
Show *Show `json:"show"`
Seasons []*CollectedSeason `json:"seasons"`
}
CollectionShow ...
func (*CollectionShow) MarshalMsg ¶ added in v0.1.115
func (z *CollectionShow) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CollectionShow) Msgsize ¶ added in v0.1.115
func (z *CollectionShow) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CollectionShow) UnmarshalMsg ¶ added in v0.1.115
func (z *CollectionShow) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Episode ¶
type Episode struct {
// Show *Show `json:"-"`
// Season *ShowSeason `json:"-"`
Absolute int `json:"number_abs"`
FirstAired string `json:"first_aired"`
Number int `json:"number"`
Overview string `json:"overview"`
Season int `json:"season"`
Title string `json:"title"`
Translations []string `json:"available_translations"`
Runtime int `json:"runtime"`
Rating float32 `json:"rating"`
Votes int `json:"votes"`
IDs *IDs `json:"ids"`
}
Episode ...
func GetEpisode ¶
GetEpisode ...
func GetEpisodeByTMDB ¶
GetEpisodeByTMDB ...
func GetEpisodeByTVDB ¶
GetEpisodeByTVDB ...
func GetSeasonEpisodes ¶
GetSeasonEpisodes ...
func (*Episode) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
func (*Episode) Msgsize ¶ added in v0.1.115
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Episode) ToListItem ¶
ToListItem ...
type EpisodeSearchResults ¶
type EpisodeSearchResults []struct {
Type string `json:"type"`
Score any `json:"score"`
Episode *Episode
Show *Show
}
EpisodeSearchResults ...
func (EpisodeSearchResults) MarshalMsg ¶ added in v0.1.115
func (z EpisodeSearchResults) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (EpisodeSearchResults) Msgsize ¶ added in v0.1.115
func (z EpisodeSearchResults) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*EpisodeSearchResults) UnmarshalMsg ¶ added in v0.1.115
func (z *EpisodeSearchResults) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type HiddenShow ¶
type HiddenShow struct {
HiddenAt time.Time `json:"hidden_at"`
Type string `json:"type"`
Show *Show `json:"show"`
}
HiddenShow ...
func (*HiddenShow) MarshalMsg ¶ added in v0.1.115
func (z *HiddenShow) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*HiddenShow) Msgsize ¶ added in v0.1.115
func (z *HiddenShow) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*HiddenShow) UnmarshalMsg ¶ added in v0.1.115
func (z *HiddenShow) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type HistoryResponse ¶
type HistoryResponse struct {
Added HistoryResponseStats `json:"added"`
Deleted HistoryResponseStats `json:"deleted"`
NotFound struct {
Movies []struct {
IDs *IDs `json:"IDs"`
} `json:"movies"`
Shows []struct {
IDs *IDs `json:"IDs"`
} `json:"shows"`
Seasons []struct {
IDs *IDs `json:"IDs"`
} `json:"seasons"`
Episodes []struct {
IDs *IDs `json:"IDs"`
} `json:"episodes"`
Ids []int `json:"ids"`
} `json:"not_found"`
}
HistoryResponse reflects response from History remove
func SetMultipleWatched ¶
func SetMultipleWatched(items []*WatchedItem) (*HistoryResponse, error)
SetMultipleWatched adds and removes from watched history
func (*HistoryResponse) MarshalMsg ¶ added in v0.1.115
func (z *HistoryResponse) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*HistoryResponse) Msgsize ¶ added in v0.1.115
func (z *HistoryResponse) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*HistoryResponse) UnmarshalMsg ¶ added in v0.1.115
func (z *HistoryResponse) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type HistoryResponseStats ¶
HistoryResponseStats refrects stats for each action type
func (HistoryResponseStats) MarshalMsg ¶ added in v0.1.115
func (z HistoryResponseStats) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (HistoryResponseStats) Msgsize ¶ added in v0.1.115
func (z HistoryResponseStats) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*HistoryResponseStats) UnmarshalMsg ¶ added in v0.1.115
func (z *HistoryResponseStats) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type IDs ¶
type IDs struct {
Trakt int `json:"trakt"`
IMDB string `json:"imdb"`
TMDB int `json:"tmdb"`
TVDB int `json:"tvdb"`
TVRage int `json:"tvrage"`
Slug string `json:"slug"`
}
IDs ...
func (*IDs) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
func (*IDs) Msgsize ¶ added in v0.1.115
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*IDs) ToUniqueIDs ¶
type List ¶
type List struct {
Name string `json:"name"`
Description string `json:"description"`
Privacy string `json:"privacy"`
Type string `json:"type"`
DisplayNumbers bool `json:"display_numbers"`
AllowComments bool `json:"allow_comments"`
SortBy string `json:"sort_by"`
SortHow string `json:"sort_how"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ItemCount int `json:"item_count"`
CommentCount int `json:"comment_count"`
Likes int `json:"likes"`
IDs *IDs `json:"IDs"`
User *User `json:"User"`
}
List ...
func (*List) IsOfficial ¶
func (*List) IsPersonal ¶
func (*List) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
func (*List) Msgsize ¶ added in v0.1.115
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*List) UnmarshalMsg ¶ added in v0.1.115
UnmarshalMsg implements msgp.Unmarshaler
type ListActivities ¶
type ListActivities struct {
Previous *List
Current *List
// contains filtered or unexported fields
}
func GetListActivities ¶
func GetListActivities(user, listID string) (*ListActivities, error)
func (*ListActivities) HasCurrent ¶
func (a *ListActivities) HasCurrent() bool
func (*ListActivities) HasPrevious ¶
func (a *ListActivities) HasPrevious() bool
func (*ListActivities) IsUpdated ¶
func (a *ListActivities) IsUpdated() bool
func (*ListActivities) SaveCurrent ¶
func (a *ListActivities) SaveCurrent() error
type ListContainer ¶
type ListContainer struct {
LikeCount int `json:"like_count"`
CommentCount int `json:"comment_count"`
LikedAt time.Time `json:"liked_at"`
Type string `json:"type"`
List *List `json:"list"`
}
ListContainer ...
func (*ListContainer) MarshalMsg ¶ added in v0.1.115
func (z *ListContainer) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ListContainer) Msgsize ¶ added in v0.1.115
func (z *ListContainer) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ListContainer) UnmarshalMsg ¶ added in v0.1.115
func (z *ListContainer) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ListItem ¶
type ListItem struct {
Rank int `json:"rank"`
ListedAt time.Time `json:"listed_at"`
Type string `json:"type"`
Movie *Movie `json:"movie"`
Show *Show `json:"show"`
}
ListItem ...
func (*ListItem) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type ListItemsPayload ¶
type ListItemsPayload struct {
Movies []*Movie `json:"movies,omitempty"`
Shows []*Show `json:"shows,omitempty"`
}
ListItemsPayload describes items to add/remove from userlists
func (*ListItemsPayload) MarshalMsg ¶ added in v0.1.115
func (z *ListItemsPayload) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ListItemsPayload) Msgsize ¶ added in v0.1.115
func (z *ListItemsPayload) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ListItemsPayload) UnmarshalMsg ¶ added in v0.1.115
func (z *ListItemsPayload) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Movie ¶
type Movie struct {
Object
Certification string `json:"certification"`
Genres []string `json:"genres"`
Language string `json:"language"`
Overview string `json:"overview"`
Rating float32 `json:"rating"`
Released string `json:"released"`
Runtime int `json:"runtime"`
TagLine string `json:"tagline"`
Trailer string `json:"trailer"`
Translations []string `json:"available_translations"`
URL string `json:"homepage"`
Votes int `json:"votes"`
}
Movie ...
func (*Movie) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type MovieSearchResults ¶
type MovieSearchResults []struct {
Type string `json:"type"`
Score any `json:"score"`
Movie *Movie `json:"movie"`
}
MovieSearchResults ...
func (MovieSearchResults) MarshalMsg ¶ added in v0.1.115
func (z MovieSearchResults) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (MovieSearchResults) Msgsize ¶ added in v0.1.115
func (z MovieSearchResults) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*MovieSearchResults) UnmarshalMsg ¶ added in v0.1.115
func (z *MovieSearchResults) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Movies ¶
Movies ...
func CollectionMovies ¶
CollectionMovies ...
func ListItemsMovies ¶
ListItemsMovies ...
func PreviousCollectionMovies ¶
PreviousCollectionMovies ...
func PreviousListItemsMovies ¶
PreviousListItemsMovies ...
func PreviousWatchlistMovies ¶
PreviousWatchlistMovies ...
func SearchMovies ¶
SearchMovies ...
func WatchlistMovies ¶
WatchlistMovies ...
func (*Movies) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type Object ¶
type Object struct {
Title string `json:"title"`
Year int `json:"year"`
IDs *IDs `json:"ids"`
UpdatedAt time.Time `json:"updated_at"`
}
Object ...
func (*Object) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type Pagination ¶
type Pagination struct {
ItemCount int `json:"x_pagination_item_count"`
Limit int `json:"x_pagination_limit"`
Page int `json:"x_pagination_page"`
PageCount int `json:"x_pagination_page_count"`
}
Pagination ...
func (*Pagination) MarshalMsg ¶ added in v0.1.115
func (z *Pagination) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*Pagination) Msgsize ¶ added in v0.1.115
func (z *Pagination) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Pagination) UnmarshalMsg ¶ added in v0.1.115
func (z *Pagination) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PausedEpisode ¶
type PausedEpisode struct {
Progress float64 `json:"progress"`
PausedAt time.Time `json:"paused_at"`
ID int `json:"id"`
Type string `json:"type"`
Episode *Episode `json:"episode"`
Show *Show `json:"show"`
}
PausedEpisode represents paused episode with show information
func (*PausedEpisode) MarshalMsg ¶ added in v0.1.115
func (z *PausedEpisode) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*PausedEpisode) Msgsize ¶ added in v0.1.115
func (z *PausedEpisode) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*PausedEpisode) UnmarshalMsg ¶ added in v0.1.115
func (z *PausedEpisode) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PausedMovie ¶
type PausedMovie struct {
Progress float64 `json:"progress"`
PausedAt time.Time `json:"paused_at"`
ID int `json:"id"`
Type string `json:"type"`
Movie *Movie `json:"movie"`
}
PausedMovie represents paused movie
func (*PausedMovie) MarshalMsg ¶ added in v0.1.115
func (z *PausedMovie) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*PausedMovie) Msgsize ¶ added in v0.1.115
func (z *PausedMovie) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*PausedMovie) UnmarshalMsg ¶ added in v0.1.115
func (z *PausedMovie) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ProgressShow ¶
ProgressShow ...
func FilterHiddenProgressShows ¶
func FilterHiddenProgressShows(inShows []*ProgressShow) (outShows []*ProgressShow)
FilterHiddenProgressShows returns a slice of ProgressShow without hidden shows
func WatchedShowsProgress ¶
func WatchedShowsProgress() (shows []*ProgressShow, err error)
WatchedShowsProgress ...
func (*ProgressShow) MarshalMsg ¶ added in v0.1.115
func (z *ProgressShow) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ProgressShow) Msgsize ¶ added in v0.1.115
func (z *ProgressShow) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ProgressShow) UnmarshalMsg ¶ added in v0.1.115
func (z *ProgressShow) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Provider ¶ added in v0.1.116
type Provider struct{}
Provider adapts the trakt package to tracker.Provider.
func NewProvider ¶ added in v0.1.116
func NewProvider() *Provider
NewProvider returns the Trakt tracker.
func (*Provider) Authorized ¶ added in v0.1.116
func (*Provider) Collection ¶ added in v0.1.116
func (*Provider) Deauthorize ¶ added in v0.1.116
func (*Provider) LastActivities ¶ added in v0.1.116
func (p *Provider) LastActivities() (*tracker.Activities, error)
func (*Provider) MinSyncInterval ¶ added in v0.1.116
func (*Provider) Progress ¶ added in v0.1.117
Progress returns the next episode of shows in progress. The Trakt progress menu keeps its own view; this makes the progress entry appear in the tracker menu.
func (*Provider) RefreshToken ¶ added in v0.1.116
RefreshToken renews the token 90 minutes before its 24h expiry, see https://github.com/trakt/api-help/discussions/495
func (*Provider) SetWatched ¶ added in v0.1.116
func (p *Provider) SetWatched(items []*tracker.WatchedItem, watched bool) error
type Season ¶
type Season struct {
// Show *Show `json:"-"`
AiredEpisodes int `json:"aired_episodes"`
EpisodeCount int `json:"episode_count"`
FirstAired string `json:"first_aired"`
Network string `json:"network"`
Number int `json:"number"`
Overview string `json:"overview"`
Rating float32 `json:"rating"`
Votes int `json:"votes"`
Episodes []*Episode `json:"episodes"`
IDs *IDs `json:"ids"`
}
Season ...
func (*Season) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type Show ¶
type Show struct {
Object
AiredEpisodes int `json:"aired_episodes"`
Airs *Airs `json:"airs"`
Certification string `json:"certification"`
Country string `json:"country"`
FirstAired string `json:"first_aired"`
Genres []string `json:"genres"`
Language string `json:"language"`
Network string `json:"network"`
Overview string `json:"overview"`
Rating float32 `json:"rating"`
Runtime int `json:"runtime"`
TagLine string `json:"tagline"`
Status string `json:"status"`
Trailer string `json:"trailer"`
Translations []string `json:"available_translations"`
URL string `json:"homepage"`
Votes int `json:"votes"`
}
Show ...
func (*Show) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type ShowSearchResults ¶
type ShowSearchResults []struct {
Type string `json:"type"`
Score any `json:"score"`
Show *Show `json:"show"`
}
ShowSearchResults ...
func (ShowSearchResults) MarshalMsg ¶ added in v0.1.115
func (z ShowSearchResults) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (ShowSearchResults) Msgsize ¶ added in v0.1.115
func (z ShowSearchResults) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ShowSearchResults) UnmarshalMsg ¶ added in v0.1.115
func (z *ShowSearchResults) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Shows ¶
Shows ...
func CollectionShows ¶
CollectionShows ...
func ListHiddenShows ¶
ListHiddenShows updates list of hidden shows for a given section
func ListItemsShows ¶
ListItemsShows ...
func PreviousCollectionShows ¶
PreviousCollectionShows ...
func PreviousListItemsShows ¶
PreviousListItemsShows ...
func PreviousWatchlistShows ¶
PreviousWatchlistShows ...
func SearchShows ¶
SearchShows ... TODO: Actually use this somewhere
func WatchlistShows ¶
WatchlistShows ...
func (*Shows) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type Sizes ¶
type Sizes struct {
Full string `json:"full"`
Medium string `json:"medium"`
Thumbnail string `json:"thumb"`
}
Sizes ...
func (Sizes) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type Token ¶
type Token struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
}
Token ...
func (*Token) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type TokenRefresh ¶
type TokenRefresh struct {
RefreshToken string `json:"refresh_token"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
RedirectURI string `json:"redirect_uri"`
GrantType string `json:"grant_type"`
}
TokenRefresh ...
func (*TokenRefresh) MarshalMsg ¶ added in v0.1.115
func (z *TokenRefresh) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*TokenRefresh) Msgsize ¶ added in v0.1.115
func (z *TokenRefresh) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*TokenRefresh) UnmarshalMsg ¶ added in v0.1.115
func (z *TokenRefresh) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type User ¶
type User struct {
Username string `json:"username"`
Private bool `json:"private"`
Name string `json:"name"`
Vip bool `json:"vip"`
VipEp bool `json:"vip_ep"`
Ids struct {
Slug string `json:"slug"`
} `json:"ids"`
}
User ...
func (*User) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type UserActivities ¶
type UserActivities struct {
All time.Time `json:"all"`
Movies struct {
WatchedAt time.Time `json:"watched_at"`
CollectedAt time.Time `json:"collected_at"`
RatedAt time.Time `json:"rated_at"`
WatchlistedAt time.Time `json:"watchlisted_at"`
FavoritedAt time.Time `json:"favorited_at"`
CommentedAt time.Time `json:"commented_at"`
PausedAt time.Time `json:"paused_at"`
HiddenAt time.Time `json:"hidden_at"`
} `json:"movies"`
Episodes struct {
WatchedAt time.Time `json:"watched_at"`
CollectedAt time.Time `json:"collected_at"`
RatedAt time.Time `json:"rated_at"`
WatchlistedAt time.Time `json:"watchlisted_at"`
CommentedAt time.Time `json:"commented_at"`
PausedAt time.Time `json:"paused_at"`
} `json:"episodes"`
Shows struct {
RatedAt time.Time `json:"rated_at"`
WatchlistedAt time.Time `json:"watchlisted_at"`
FavoritedAt time.Time `json:"favorited_at"`
CommentedAt time.Time `json:"commented_at"`
HiddenAt time.Time `json:"hidden_at"`
} `json:"shows"`
Seasons struct {
RatedAt time.Time `json:"rated_at"`
WatchlistedAt time.Time `json:"watchlisted_at"`
CommentedAt time.Time `json:"commented_at"`
HiddenAt time.Time `json:"hidden_at"`
} `json:"seasons"`
Comments struct {
LikedAt time.Time `json:"liked_at"`
BlockedAt time.Time `json:"blocked_at"`
} `json:"comments"`
Lists struct {
LikedAt time.Time `json:"liked_at"`
UpdatedAt time.Time `json:"updated_at"`
CommentedAt time.Time `json:"commented_at"`
} `json:"lists"`
Watchlist struct {
UpdatedAt time.Time `json:"updated_at"`
} `json:"watchlist"`
Favorites struct {
UpdatedAt time.Time `json:"updated_at"`
} `json:"favorites"`
Account struct {
SettingsAt time.Time `json:"settings_at"`
FollowedAt time.Time `json:"followed_at"`
FollowingAt time.Time `json:"following_at"`
PendingAt time.Time `json:"pending_at"`
RequestedAt time.Time `json:"requested_at"`
} `json:"account"`
SavedFilters struct {
UpdatedAt time.Time `json:"updated_at"`
} `json:"saved_filters"`
Notes struct {
UpdatedAt time.Time `json:"updated_at"`
} `json:"notes"`
}
UserActivities is a structure, returned by sync/last_activities
func GetLastActivities ¶
func GetLastActivities() (ret *UserActivities, err error)
GetLastActivities ...
func (*UserActivities) MarshalMsg ¶ added in v0.1.115
func (z *UserActivities) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*UserActivities) Msgsize ¶ added in v0.1.115
func (z *UserActivities) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UserActivities) UnmarshalMsg ¶ added in v0.1.115
func (z *UserActivities) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type UserSettings ¶
type UserSettings struct {
User User `json:"user"`
Account struct{} `json:"account"`
}
UserSettings ...
func (*UserSettings) MarshalMsg ¶ added in v0.1.115
func (z *UserSettings) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*UserSettings) Msgsize ¶ added in v0.1.115
func (z *UserSettings) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*UserSettings) UnmarshalMsg ¶ added in v0.1.115
func (z *UserSettings) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedEpisode ¶
type WatchedEpisode struct {
Number int `json:"number"`
Plays int `json:"plays"`
LastWatchedAt time.Time `json:"last_watched_at"`
}
WatchedEpisode ...
func (WatchedEpisode) MarshalMsg ¶ added in v0.1.115
func (z WatchedEpisode) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (WatchedEpisode) Msgsize ¶ added in v0.1.115
func (z WatchedEpisode) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchedEpisode) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedEpisode) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedItem ¶
type WatchedItem struct {
MediaType string
KodiID int
KodiKey uint64
Movie int
Show int
Season int
Episode int
Watched bool
WatchedAt time.Time
}
WatchedItem represents possible watched add/delete item
func (*WatchedItem) MarshalMsg ¶ added in v0.1.115
func (z *WatchedItem) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchedItem) Msgsize ¶ added in v0.1.115
func (z *WatchedItem) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchedItem) String ¶
func (item *WatchedItem) String() (query string)
func (*WatchedItem) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedItem) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedMovie ¶
type WatchedMovie struct {
Plays int `json:"plays"`
LastWatchedAt time.Time `json:"last_watched_at"`
Movie *Movie `json:"movie"`
}
WatchedMovie ...
func DiffWatchedMovies ¶
func DiffWatchedMovies(previous, current []*WatchedMovie, checkDate bool) []*WatchedMovie
DiffWatchedMovies ...
func PreviousWatchedMovies ¶
func PreviousWatchedMovies() ([]*WatchedMovie, error)
PreviousWatchedMovies ...
func (*WatchedMovie) MarshalMsg ¶ added in v0.1.115
func (z *WatchedMovie) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchedMovie) Msgsize ¶ added in v0.1.115
func (z *WatchedMovie) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchedMovie) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedMovie) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedMoviesType ¶
type WatchedMoviesType []*WatchedMovie
func WatchedMovies ¶
func WatchedMovies(isUpdateNeeded bool) (WatchedMoviesType, error)
WatchedMovies ...
func (WatchedMoviesType) MarshalMsg ¶ added in v0.1.115
func (z WatchedMoviesType) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (WatchedMoviesType) Msgsize ¶ added in v0.1.115
func (z WatchedMoviesType) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (WatchedMoviesType) ToMovies ¶
func (m WatchedMoviesType) ToMovies() []*Movies
func (*WatchedMoviesType) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedMoviesType) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedProgressShow ¶
type WatchedProgressShow struct {
Aired int `json:"aired"`
Completed int `json:"completed"`
LastWatchedAt time.Time `json:"last_watched_at"`
Seasons []*Season `json:"seasons"`
HiddenSeasons []*Season `json:"hidden_seasons"`
NextEpisode *Episode `json:"next_episode"`
LastEpisode *Episode `json:"last_episode"`
}
WatchedProgressShow ...
func (*WatchedProgressShow) MarshalMsg ¶ added in v0.1.115
func (z *WatchedProgressShow) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchedProgressShow) Msgsize ¶ added in v0.1.115
func (z *WatchedProgressShow) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchedProgressShow) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedProgressShow) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedSeason ¶
type WatchedSeason struct {
Plays int `json:"plays"`
Number int `json:"number"`
Episodes []*WatchedEpisode `json:"episodes"`
}
WatchedSeason ...
func (*WatchedSeason) MarshalMsg ¶ added in v0.1.115
func (z *WatchedSeason) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchedSeason) Msgsize ¶ added in v0.1.115
func (z *WatchedSeason) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchedSeason) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedSeason) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedShow ¶
type WatchedShow struct {
Plays int `json:"plays"`
Watched bool
LastWatchedAt time.Time `json:"last_watched_at"`
Show *Show `json:"show"`
Seasons []*WatchedSeason `json:"seasons"`
}
WatchedShow ...
func DiffWatchedShows ¶
func DiffWatchedShows(current, previous []*WatchedShow) (diff []*WatchedShow)
DiffWatchedShows ...
func PreviousWatchedShows ¶
func PreviousWatchedShows() ([]*WatchedShow, error)
PreviousWatchedShows ...
func (*WatchedShow) MarshalMsg ¶ added in v0.1.115
func (z *WatchedShow) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchedShow) Msgsize ¶ added in v0.1.115
func (z *WatchedShow) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchedShow) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedShow) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchedShowsType ¶
type WatchedShowsType []*WatchedShow
func WatchedShows ¶
func WatchedShows(isUpdateNeeded bool) (WatchedShowsType, error)
WatchedShows ...
func (WatchedShowsType) MarshalMsg ¶ added in v0.1.115
func (z WatchedShowsType) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (WatchedShowsType) Msgsize ¶ added in v0.1.115
func (z WatchedShowsType) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (WatchedShowsType) ToShows ¶
func (s WatchedShowsType) ToShows() []*Shows
func (*WatchedShowsType) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchedShowsType) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Watchlist ¶
type Watchlist struct {
Movies []*Movie `json:"movies"`
Shows []*Show `json:"shows"`
Episodes []*Episode `json:"episodes"`
}
Watchlist ...
func (*Watchlist) MarshalMsg ¶ added in v0.1.115
MarshalMsg implements msgp.Marshaler
type WatchlistEpisode ¶
type WatchlistEpisode struct {
ListedAt time.Time `json:"listed_at"`
Type string `json:"type"`
Episode *Episode `json:"episode"`
Show *Object `json:"show"`
}
WatchlistEpisode ...
func (*WatchlistEpisode) MarshalMsg ¶ added in v0.1.115
func (z *WatchlistEpisode) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchlistEpisode) Msgsize ¶ added in v0.1.115
func (z *WatchlistEpisode) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchlistEpisode) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchlistEpisode) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchlistMovie ¶
type WatchlistMovie struct {
ListedAt time.Time `json:"listed_at"`
Type string `json:"type"`
Movie *Movie `json:"movie"`
}
WatchlistMovie ...
func (*WatchlistMovie) MarshalMsg ¶ added in v0.1.115
func (z *WatchlistMovie) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchlistMovie) Msgsize ¶ added in v0.1.115
func (z *WatchlistMovie) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchlistMovie) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchlistMovie) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchlistSeason ¶
type WatchlistSeason struct {
ListedAt time.Time `json:"listed_at"`
Type string `json:"type"`
Season *Object `json:"season"`
Show *Object `json:"show"`
}
WatchlistSeason ...
func (*WatchlistSeason) MarshalMsg ¶ added in v0.1.115
func (z *WatchlistSeason) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchlistSeason) Msgsize ¶ added in v0.1.115
func (z *WatchlistSeason) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchlistSeason) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchlistSeason) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type WatchlistShow ¶
type WatchlistShow struct {
ListedAt time.Time `json:"listed_at"`
Type string `json:"type"`
Show *Show `json:"show"`
}
WatchlistShow ...
func (*WatchlistShow) MarshalMsg ¶ added in v0.1.115
func (z *WatchlistShow) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*WatchlistShow) Msgsize ¶ added in v0.1.115
func (z *WatchlistShow) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*WatchlistShow) UnmarshalMsg ¶ added in v0.1.115
func (z *WatchlistShow) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler