Documentation
¶
Overview ¶
Package str used for structs
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs ¶
Package str used for structs
Index ¶
- Constants
- Variables
- func Bool(v bool) *bool
- func ContainInt(key int, s []int) bool
- func ContainString(key string, s []string) bool
- func Format(pattern string, args ...any) string
- func Formatc(pattern string, data map[string]any) string
- func Int(v int) *int
- func Int64(v int64) *int64
- func String(v string) *string
- func Stringify(message any) string
- type Air
- type Avatar
- type CalendarList
- type Certification
- type Certifications
- type Character
- type CheckIn
- type Collection
- type Comment
- type CommentItem
- type CommentMediaItem
- type CommentUserLike
- type Connections
- type Crew
- type CurrentDeviceToken
- type DeviceCode
- type DeviceToken
- type Episode
- type Episodes
- type ErrorResponse
- type Errors
- type ExportlistItem
- type ExportlistItemJSON
- type Favorites
- type HistoryListItem
- type IDs
- type Images
- type Job
- type Limits
- type List
- type ListComment
- type Metadata
- type Movie
- type Movies
- type Network
- type NewDeviceCode
- type NewDeviceToken
- type Notes
- type Options
- type Person
- type PersonItem
- type PersonMovies
- type PersonShows
- type PersonalList
- type Podcast
- type PodcastEpisode
- type Rate
- type Ratings
- type Response
- type SavedFilter
- type Search
- type SearchListItem
- type Season
- type Seasons
- type Sharing
- type SharingText
- type Show
- type Shows
- type Slice
- type SocialIDs
- type Timestamp
- type Token
- type TokenInterface
- type UserAccount
- type UserLike
- type UserListItem
- type UserProfile
- type UserSettings
- type UserStats
- type UserWatched
- type ValidationErrors
- type Watchlist
Constants ¶
const (
Empty = 0
)
consts
Variables ¶
var Headers = map[string]any{
"Accept": "application/json",
"Content-Type": "application/json",
"User-Agent": "Trakt exporter",
"Connection": "Keep-Alive",
"trakt-api-version": "2",
"trakt-api-key": "",
"Authorization": "",
}
Headers map with headers
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func ContainString ¶
ContainString check if string exists in slice
func Int ¶
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
func Int64 ¶
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
Types ¶
type Air ¶
type Air struct {
Day *string `json:"day,omitempty"`
Time *string `json:"time,omitempty"`
TimeZone *string `json:"timezone,omitempty"`
}
Air represents JSON response for media object
type Avatar ¶
type Avatar struct {
Full *string `json:"full,omitempty"`
}
Avatar represents JSON avatar object
type CalendarList ¶
type CalendarList struct {
Released *string `json:"released,omitempty"`
FirstAired *Timestamp `json:"first_aired,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Show *Show `json:"show,omitempty"`
Movie *Movie `json:"movie,omitempty"`
}
CalendarList represents JSON calendar list item
func (CalendarList) String ¶
func (c CalendarList) String() string
type Certification ¶ added in v1.6.0
type Certification struct {
Name *string `json:"name,omitempty"`
Slug *string `json:"slug,omitempty"`
Description *string `json:"description,omitempty"`
}
Certification represents JSON certification object
func (Certification) String ¶ added in v1.6.0
func (c Certification) String() string
type Certifications ¶ added in v1.6.0
type Certifications struct {
Us []*Certification `json:"us,omitempty"`
}
Certifications represents JSON certifications object
func (Certifications) String ¶ added in v1.6.0
func (c Certifications) String() string
type Character ¶
type Character struct {
Character *string `json:"character,omitempty"`
Characters *[]string `json:"characters,omitempty"`
EpisodeCount *int `json:"episode_count,omitempty"`
SeriesRegular *bool `json:"series_regular,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
}
Character represents JSON character object
type CheckIn ¶ added in v1.5.0
type CheckIn struct {
ID *int64 `json:"id,omitempty"`
Watched *Timestamp `json:"watched,omitempty"`
Expires *Timestamp `json:"expires_at,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Sharing *Sharing `json:"sharing,omitempty"`
Message *string `json:"message,omitempty"`
}
CheckIn represents JSON checkin object
type Collection ¶ added in v1.5.0
type Collection struct {
ItemCount *int `json:"item_count,omitempty"`
}
Collection represents JSON collection object
func (Collection) String ¶ added in v1.5.0
func (c Collection) String() string
type Comment ¶ added in v1.6.0
type Comment struct {
ID *int `json:"id,omitempty"`
ParentID *int `json:"parent_id,omitempty"`
CreatedAt *Timestamp `json:"created_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
Comment *string `json:"comment,omitempty"`
Spoiler *bool `json:"spoiler,omitempty"`
Sharing *Sharing `json:"sharing,omitempty"`
Review *bool `json:"review,omitempty"`
Replies *int `json:"replies,omitempty"`
Likes *int `json:"likes,omitempty"`
UserStats *UserStats `json:"user_stats,omitempty"`
User *UserProfile `json:"user,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Season *Season `json:"season,omitempty"`
Episode *Episode `json:"episode,omitempty"`
List *PersonalList `json:"list,omitempty"`
}
Comment represents JSON comment object
type CommentItem ¶ added in v1.6.0
type CommentItem struct {
Type *string `json:"type,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Season *Season `json:"season,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Show *Show `json:"show,omitempty"`
List *List `json:"list,omitempty"`
Comment *Comment `json:"comment,omitempty"`
}
CommentItem represents JSON comment item object
func (CommentItem) String ¶ added in v1.6.0
func (c CommentItem) String() string
type CommentMediaItem ¶ added in v1.6.0
type CommentMediaItem struct {
Type *string `json:"type,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Season *Season `json:"season,omitempty"`
Episode *Episode `json:"episode,omitempty"`
List *PersonalList `json:"list,omitempty"`
}
CommentMediaItem represents JSON comment media item object
func (CommentMediaItem) String ¶ added in v1.6.0
func (c CommentMediaItem) String() string
type CommentUserLike ¶ added in v1.6.0
type CommentUserLike struct {
LikedAt *Timestamp `json:"liked_at,omitempty"`
User *UserProfile `json:"user,omitempty"`
}
CommentUserLike represents JSON user comment like object
func (CommentUserLike) String ¶ added in v1.6.0
func (c CommentUserLike) String() string
type Connections ¶ added in v1.5.0
type Connections struct {
Facebook *bool `json:"facebook,omitempty"`
Twitter *bool `json:"twitter,omitempty"`
Mastodon *bool `json:"mastodon,omitempty"`
Google *bool `json:"google,omitempty"`
Tumblr *bool `json:"tumblr,omitempty"`
Medium *bool `json:"medium,omitempty"`
Slack *bool `json:"slack,omitempty"`
Apple *bool `json:"apple,omitempty"`
Dropbox *bool `json:"dropbox,omitempty"`
Microsoft *bool `json:"microsoft,omitempty"`
}
Connections represents JSON connections object
func (Connections) String ¶ added in v1.5.0
func (c Connections) String() string
type Crew ¶
type Crew struct {
Writing *[]Job `json:"writing,omitempty"`
Directing *[]Job `json:"directing,omitempty"`
Production *[]Job `json:"production,omitempty"`
}
Crew represents JSON crew object
type CurrentDeviceToken ¶
type CurrentDeviceToken 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"`
}
CurrentDeviceToken represents JSON current device token object
type DeviceCode ¶
type DeviceCode 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"`
}
DeviceCode represents JSON response for /device/code
type DeviceToken ¶
type DeviceToken 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"`
CreatedAt *int `json:"created_at"`
}
DeviceToken represents JSON response for /device/token
type Episode ¶
type Episode struct {
Season *int `json:"season,omitempty"`
Number *int `json:"number,omitempty"`
Plays *int `json:"plays,omitempty"`
Title *string `json:"title,omitempty"`
IDs *IDs `json:"ids,omitempty"`
NumberAbs *int `json:"number_abs,omitempty"`
Overview *string `json:"overview,omitempty"`
Rating *float32 `json:"rating,omitempty"`
Votes *int `json:"votes,omitempty"`
CommentCount *int `json:"comment_count,omitempty"`
FirstAired *Timestamp `json:"first_aired,omitempty"`
LastWatchedAt *Timestamp `json:"last_watched_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
AvailableTranslations *[]string `json:"available_translations,omitempty"`
Runtime *int `json:"runtime,omitempty"`
EpisodeType *string `json:"episode_type,omitempty"`
}
Episode represents JSON response for media object
type Episodes ¶ added in v1.2.0
type Episodes struct {
Plays *int `json:"plays,omitempty"`
Watched *int `json:"watched,omitempty"`
Minutes *int `json:"minutes,omitempty"`
Collected *int `json:"collected,omitempty"`
Ratings *int `json:"ratings,omitempty"`
Comments *int `json:"comments,omitempty"`
}
Episodes represents JSON episodes object
type ErrorResponse ¶
type ErrorResponse struct {
Response *http.Response `json:"-"` // HTTP response that caused this error
Message string `json:"message,omitempty"` // error message
Errors *Errors `json:"errors,omitempty"` // errors object
}
ErrorResponse represents reponse with message
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
func (ErrorResponse) String ¶ added in v1.6.0
func (r ErrorResponse) String() string
type Errors ¶ added in v1.6.0
type Errors struct {
Comment *[]string `json:"comment,omitempty"`
}
Errors represents JSON response for errors object
func (*Errors) GetComments ¶ added in v1.6.0
GetComments returns a joined string of errors for the Comment field or nil if empty
type ExportlistItem ¶
type ExportlistItem struct {
Rank *int `json:"rank,omitempty"`
ID *int64 `json:"id,omitempty"`
WatchedAt *Timestamp `json:"watched_at,omitempty"`
ListedAt *Timestamp `json:"listed_at,omitempty"`
CollectedAt *Timestamp `json:"collected_at,omitempty"`
LastCollectedAt *Timestamp `json:"last_collected_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
LastUpdatedAt *Timestamp `json:"last_updated_at,omitempty"`
Notes *string `json:"notes,omitempty"`
Type *string `json:"type,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Season *Season `json:"season,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
}
ExportlistItem represents JSON for list item
func (ExportlistItem) GetTime ¶
func (i ExportlistItem) GetTime() *Timestamp
GetTime return Timestamp from item
func (ExportlistItem) String ¶
func (i ExportlistItem) String() string
type ExportlistItemJSON ¶
type ExportlistItemJSON struct {
Title *string `json:"title,omitempty"`
Trakt *int64 `json:"trakt,omitempty"`
Imdb *string `json:"imdb,omitempty"`
Tmdb *int `json:"tmdb,omitempty"`
Tvdb *int `json:"tvdb,omitempty"`
WatchedAt *Timestamp `json:"watched_at,omitempty"`
ListedAt *Timestamp `json:"listed_at,omitempty"`
CollectedAt *Timestamp `json:"collected_at,omitempty"`
LastCollectedAt *Timestamp `json:"last_collected_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
LastUpdatedAt *Timestamp `json:"last_updated_at,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Season *Season `json:"season,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Year *int `json:"year,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
}
ExportlistItemJSON represents JSON for list item
func (ExportlistItemJSON) String ¶
func (i ExportlistItemJSON) String() string
func (*ExportlistItemJSON) Uptime ¶ added in v1.0.5
func (i *ExportlistItemJSON) Uptime(options *Options, data *ExportlistItem)
Uptime update item time fields
type Favorites ¶ added in v1.5.0
type Favorites struct {
ItemCount *int `json:"item_count,omitempty"`
}
Favorites represents JSON favorites object
type HistoryListItem ¶
type HistoryListItem struct {
ID *int64 `json:"id,omitempty"`
WatchedAt *Timestamp `json:"watched_at,omitempty"`
Action *string `json:"action,omitempty"`
Type *string `json:"type,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Show *Show `json:"show,omitempty"`
}
HistoryListItem represents JSON list object
func (HistoryListItem) String ¶
func (h HistoryListItem) String() string
type IDs ¶
type IDs struct {
Trakt *int64 `json:"trakt,omitempty"`
Slug *string `json:"slug,omitempty"`
Imdb *string `json:"imdb,omitempty"`
Tmdb *int `json:"tmdb,omitempty"`
Tvdb *int `json:"tvdb,omitempty"`
Tvrage *string `json:"tvrage,omitempty"`
}
IDs represents JSON ids object with ids of object from other services
type Images ¶
type Images struct {
Avatar *Avatar `json:"avatar,omitempty"`
}
Images represents JSON images object
type Job ¶
type Job struct {
Job *string `json:"job,omitempty"`
Jobs *[]string `json:"jobs,omitempty"`
EpisodeCount *int `json:"episode_count,omitempty"`
Show *Show `json:"show,omitempty"`
Movie *Movie `json:"movie,omitempty"`
}
Job represents JSON crew member positions
type Limits ¶ added in v1.5.0
type Limits struct {
List *List `json:"list,omitempty"`
Watchlist *Watchlist `json:"watchlist,omitempty"`
Favorites *Favorites `json:"favorites,omitempty"`
Search *Search `json:"search,omitempty"`
Collection *Collection `json:"collection,omitempty"`
Notes *Notes `json:"notes,omitempty"`
}
Limits represents JSON limits object
type List ¶ added in v1.4.0
type List struct {
Count *int `json:"count,omitempty"`
ItemCount *int `json:"item_count,omitempty"`
LikeCount *int `json:"like_count,omitempty"`
CommentCount *int `json:"comment_count,omitempty"`
List *PersonalList `json:"list,omitempty"`
}
List represents JSON list object
type ListComment ¶ added in v1.4.0
type ListComment struct {
ID *int `json:"id,omitempty"`
ParentID *int `json:"parent_id,omitempty"`
CreatedAt *Timestamp `json:"created_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
Comment *string `json:"comment,omitempty"`
Spoiler *bool `json:"spoiler,omitempty"`
Review *bool `json:"review,omitempty"`
Replies *int `json:"replies,omitempty"`
Likes *int `json:"likes,omitempty"`
UserStats *UserStats `json:"user_stats,omitempty"`
User *UserProfile `json:"user,omitempty"`
}
ListComment represents JSON list comment object
func (ListComment) String ¶ added in v1.4.0
func (l ListComment) String() string
type Metadata ¶
type Metadata struct {
MediaType *string `json:"media_type,omitempty"`
Resolution *string `json:"resolution,omitempty"`
Hdr *string `json:"hdr,omitempty"`
Audio *string `json:"audio,omitempty"`
AudioChannels *string `json:"audio_channels,omitempty"`
ThreeD *bool `json:"3d,omitempty"`
}
Metadata represents JSON media metadata object
type Movie ¶
type Movie struct {
Title *string `json:"title,omitempty"`
Year *int `json:"year,omitempty"`
IDs *IDs `json:"ids,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Overview *string `json:"overview,omitempty"`
Released *string `json:"released,omitempty"`
Runtime *int `json:"runtime,omitempty"`
Country *string `json:"country,omitempty"`
Trailer *string `json:"trailer,omitempty"`
Homepage *string `json:"homepage,omitempty"`
Status *string `json:"status,omitempty"`
Rating *float32 `json:"rating,omitempty"`
Votes *int `json:"votes,omitempty"`
CommentCount *int `json:"comment_count,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
Language *string `json:"language,omitempty"`
Languages *[]string `json:"languages,omitempty"`
AvailableTranslations *[]string `json:"available_translations,omitempty"`
Genres *[]string `json:"genres,omitempty"`
Certification *string `json:"certification,omitempty"`
User *UserProfile `json:"user,omitempty"`
}
Movie represents JSON movie object
type Movies ¶ added in v1.2.0
type Movies struct {
Plays *int `json:"plays,omitempty"`
Watched *int `json:"watched,omitempty"`
Minutes *int `json:"minutes,omitempty"`
Collected *int `json:"collected,omitempty"`
Ratings *int `json:"ratings,omitempty"`
Comments *int `json:"comments,omitempty"`
}
Movies represents JSON movies object
type Network ¶ added in v1.2.0
type Network struct {
Friends *int `json:"friends,omitempty"`
Followers *int `json:"followers,omitempty"`
Following *int `json:"following,omitempty"`
}
Network represents JSON network object
type NewDeviceCode ¶
type NewDeviceCode struct {
ClientID *string `json:"client_id"`
}
NewDeviceCode represents request new device code payload.
func (NewDeviceCode) String ¶
func (d NewDeviceCode) String() string
type NewDeviceToken ¶
type NewDeviceToken struct {
Code *string `json:"code"`
ClientID *string `json:"client_id"`
ClientSecret *string `json:"client_secret"`
}
NewDeviceToken represents JSON when request for new token with code
type Notes ¶ added in v1.5.0
type Notes struct {
ItemCount *int `json:"item_count,omitempty"`
}
Notes represents JSON notes object
type Options ¶
type Options struct {
Headers map[string]any
ExtendedInfo string
List string
Type string
SearchIDType string
StartDate string
Query string
Sort string
CommentsSort string
CommentType string
Module string
Action string
Format string
UserName string
Time string
ID string
Output string
SearchType Slice
SearchField Slice
Token Token
PerPage int
PagesLimit int
Days int
TraktID int
CommentID int
Msg string
Comment string
Reply string
Verbose bool
Version bool
Remove bool
Delete bool
Spoiler bool
IncludeReplies string
EpisodeAbs int
EpisodeCode string
Episode int
Season int
}
Options represents a app opions.
type Person ¶
type Person struct {
Name *string `json:"name,omitempty"`
IDs *IDs `json:"ids,omitempty"`
SocialIDs *SocialIDs `json:"social_ids,omitempty"`
Biography *string `json:"biography,omitempty"`
Birthday *string `json:"birthday,omitempty"`
Death *string `json:"death,omitempty"`
Birthplace *string `json:"birthplace,omitempty"`
Homepage *string `json:"homepage,omitempty"`
Gender *string `json:"gender,omitempty"`
KnownForDepartment *string `json:"known_for_department,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
}
Person represents JSON person object
type PersonItem ¶
type PersonItem struct {
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
Person *Person `json:"person,omitempty"`
}
PersonItem represents JSON person object
func (PersonItem) String ¶
func (p PersonItem) String() string
type PersonMovies ¶
type PersonMovies struct {
Cast *[]Character `json:"cast,omitempty"`
Crew *Crew `json:"crew,omitempty"`
}
PersonMovies represents JSON person movies object
func (PersonMovies) String ¶
func (p PersonMovies) String() string
type PersonShows ¶
type PersonShows struct {
Cast *[]Character `json:"cast,omitempty"`
Crew *Crew `json:"crew,omitempty"`
}
PersonShows represents JSON cast and crew object for person
func (PersonShows) String ¶
func (p PersonShows) String() string
type PersonalList ¶
type PersonalList struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Privacy *string `json:"privacy,omitempty"`
Type *string `json:"type,omitempty"`
DisplayNumbers *bool `json:"display_strings,omitempty"`
AllowComments *bool `json:"allow_comments,omitempty"`
SortBy *string `json:"sort_by,omitempty"`
SortHow *string `json:"sort_how,omitempty"`
CreatedAt *Timestamp `json:"created_at,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
ItemCount *int `json:"item_count,omitempty"`
CommentCount *int `json:"comment_count,omitempty"`
Likes *int `json:"likes,omitempty"`
IDs *IDs `json:"ids,omitempty"`
User *UserProfile `json:"user,omitempty"`
}
PersonalList represents JSON personal list object
func (PersonalList) String ¶
func (p PersonalList) String() string
type Podcast ¶
type Podcast struct {
Title *string `json:"title,omitempty"`
Year *int `json:"year,omitempty"`
IDs *IDs `json:"ids,omitempty"`
}
Podcast represents JSON podcast object
type PodcastEpisode ¶
type PodcastEpisode struct {
Season *int `json:"season,omitempty"`
Number *int `json:"number,omitempty"`
Title *string `json:"title,omitempty"`
IDs *IDs `json:"ids,omitempty"`
}
PodcastEpisode represents JSON podcast episode object
func (PodcastEpisode) String ¶
func (p PodcastEpisode) String() string
type Rate ¶
type Rate struct {
// The time at which the current rate limit will reset.
Reset Timestamp `json:"reset"`
// The number of requests per hour the client is currently limited to.
Limit int `json:"limit"`
// The number of remaining requests the client can make this hour.
Remaining int `json:"remaining"`
}
Rate represents the rate limit for the current client.
type Ratings ¶ added in v1.2.0
type Ratings struct {
Total *int `json:"total,omitempty"`
Distribution *map[string]int `json:"distribution,omitempty"`
}
Ratings represents JSON ratings object
type Response ¶
type Response struct {
*http.Response
// Explicitly specify the Rate type so Rate's String() receiver doesn't
// propagate to Response.
Rate Rate
Errors *Errors
}
Response http object
type SavedFilter ¶ added in v1.1.0
type SavedFilter struct {
Rank *int `json:"rank,omitempty"`
ID *int64 `json:"id,omitempty"`
Section *string `json:"section,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
Query *string `json:"query,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
}
SavedFilter represents JSON filter object
func (SavedFilter) String ¶ added in v1.1.0
func (i SavedFilter) String() string
type Search ¶ added in v1.5.0
type Search struct {
RecentCount *int `json:"recent_count,omitempty"`
}
Search represents JSON search object
type SearchListItem ¶
type SearchListItem struct {
Type *string `json:"type,omitempty"`
Score *float32 `json:"score,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Person *Person `json:"person,omitempty"`
List *PersonalList `json:"list,omitempty"`
PodcastEpisode *PodcastEpisode `json:"podcast_episode,omitempty"`
Podcast *Podcast `json:"podcast,omitempty"`
}
SearchListItem represents JSON search response object
func (SearchListItem) String ¶
func (i SearchListItem) String() string
type Season ¶
type Season struct {
Number *int `json:"number,omitempty"`
Episodes []*Episode `json:"episodes,omitempty"`
IDs *IDs `json:"ids,omitempty"`
}
Season represents JSON season object
type Seasons ¶ added in v1.2.0
type Seasons struct {
Ratings *int `json:"ratings,omitempty"`
Comments *int `json:"comments,omitempty"`
}
Seasons represents JSON sesons object
type Sharing ¶ added in v1.5.0
type Sharing struct {
Twitter *bool `json:"twitter,omitempty"`
Mastodon *bool `json:"mastodon,omitempty"`
Tumblr *bool `json:"tumblr,omitempty"`
}
Sharing represents JSON sharing object
type SharingText ¶ added in v1.5.0
type SharingText struct {
Watching *string `json:"watching,omitempty"`
Watched *string `json:"watched,omitempty"`
Rated *string `json:"rated,omitempty"`
}
SharingText represents JSON sharing text object
func (SharingText) String ¶ added in v1.5.0
func (s SharingText) String() string
type Show ¶
type Show struct {
Title *string `json:"title,omitempty"`
Year *int `json:"year,omitempty"`
IDs *IDs `json:"ids,omitempty"`
Tagline *string `json:"tagline,omitempty"`
Overview *string `json:"overview,omitempty"`
FirstAired *Timestamp `json:"first_aired,omitempty"`
Airs *Air `json:"airs,omitempty"`
Runtime *int `json:"runtime,omitempty"`
Certification *string `json:"certification,omitempty"`
Network *string `json:"network,omitempty"`
Country *string `json:"country,omitempty"`
Trailer *string `json:"trailer,omitempty"`
Homepage *string `json:"homepage,omitempty"`
Status *string `json:"status,omitempty"`
Rating *float32 `json:"rating,omitempty"`
Votes *int `json:"votes,omitempty"`
CommentCount *int `json:"comment_count,omitempty"`
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
Language *string `json:"language,omitempty"`
Languages *[]string `json:"languages,omitempty"`
AvailableTranslations *[]string `json:"available_translations,omitempty"`
Genres *[]string `json:"genres,omitempty"`
AiredEpisodes *int `json:"aired_episodes,omitempty"`
}
Show represents JSON show object
type Shows ¶ added in v1.2.0
type Shows struct {
Watched *int `json:"watched,omitempty"`
Collected *int `json:"collected,omitempty"`
Ratings *int `json:"ratings,omitempty"`
Comments *int `json:"comments,omitempty"`
}
Shows represents JSON shows object
type SocialIDs ¶
type SocialIDs struct {
Twitter *string `json:"twitter,omitempty"`
Facebook *string `json:"facebook,omitempty"`
Instagram *string `json:"instagram,omitempty"`
Wikipedia *string `json:"wikipedia,omitempty"`
}
SocialIDs represents JSON object with social media handlers
type Token ¶
type Token struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
ExpiresIn int `json:"expires_in"`
CreatedAt int `json:"created_at"`
}
Token represents JSON token object
func (*Token) ExpirationPoint ¶
ExpirationPoint return point in time with nanosecond precision for token
func (*Token) ExpiritySeconds ¶
ExpiritySeconds return number of seconds to token expire
type TokenInterface ¶
TokenInterface methods for tokens
type UserAccount ¶ added in v1.5.0
type UserAccount struct {
Timezone *string `json:"timezone,omitempty"`
DateFormat *string `json:"date_format,omitempty"`
Time24HR *bool `json:"time_24hr,omitempty"`
CoverImage *string `json:"cover_image,omitempty"`
}
UserAccount represents JSON user account object
func (UserAccount) String ¶ added in v1.5.0
func (u UserAccount) String() string
type UserLike ¶ added in v1.4.0
type UserLike struct {
LikedAt *Timestamp `json:"liked_at,omitempty"`
User *UserProfile `json:"user,omitempty"`
}
UserLike represents JSON user like object
type UserListItem ¶
type UserListItem struct {
Rank *int `json:"rank,omitempty"`
ID *int `json:"id,omitempty"`
ListedAt *Timestamp `json:"listed_at,omitempty"`
Notes *string `json:"notes,omitempty"`
Type *string `json:"type,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Season *Season `json:"season,omitempty"`
Episode *Episode `json:"episode,omitempty"`
Person *Person `json:"person,omitempty"`
}
UserListItem represents JSON user personal list item object
func (UserListItem) String ¶
func (i UserListItem) String() string
type UserProfile ¶
type UserProfile struct {
Userame *string `json:"username,omitempty"`
Private *bool `json:"private,omitempty"`
Name *string `json:"name,omitempty"`
Vip *bool `json:"vip,omitempty"`
VipEp *bool `json:"vip_ep,omitempty"`
IDs *IDs `json:"ids,omitempty"`
JoinedAt *Timestamp `json:"joined_at,omitempty"`
Location *string `json:"location,omitempty"`
About *string `json:"about,omitempty"`
Gender *string `json:"gender,omitempty"`
Age *int `json:"age,omitempty"`
Images *Images `json:"images,omitempty"`
VipOg *bool `json:"vip_og,omitempty"`
VipYears *int `json:"vip_years,omitempty"`
VipCoverImage *string `json:"vip_cover_image,omitempty"`
}
UserProfile represents JSON user profile object
func (UserProfile) String ¶
func (u UserProfile) String() string
type UserSettings ¶ added in v1.5.0
type UserSettings struct {
User *UserProfile `json:"user,omitempty"`
Account *UserAccount `json:"account,omitempty"`
Connections *Connections `json:"connections,omitempty"`
SharingText *SharingText `json:"sharing_text,omitempty"`
Limits *Limits `json:"limits,omitempty"`
}
UserSettings represents JSON user stats object
func (UserSettings) String ¶ added in v1.5.0
func (u UserSettings) String() string
type UserStats ¶ added in v1.2.0
type UserStats struct {
Movies *Movies `json:"movies,omitempty"`
Shows *Shows `json:"shows,omitempty"`
Seasons *Seasons `json:"seasons,omitempty"`
Episodes *Episodes `json:"episodes,omitempty"`
Network *Network `json:"network,omitempty"`
Ratings *Ratings `json:"ratings,omitempty"`
Rating *int `json:"rating,omitempty"`
PlayCount *int `json:"play_count,omitempty"`
CompletedCount *int `json:"completed_count,omitempty"`
}
UserStats represents JSON user stats object
type UserWatched ¶ added in v1.3.0
type UserWatched struct {
Plays *int `json:"plays,omitempty"`
LastWatchedAt *Timestamp `json:"last_watched_at,omitempty"`
LastUpdatedAt *Timestamp `json:"last_updated_at,omitempty"`
ResetAt *Timestamp `json:"reset_at,omitempty"`
Movie *Movie `json:"movie,omitempty"`
Show *Show `json:"show,omitempty"`
Seasons *[]Season `json:"seasons,omitempty"`
}
UserWatched represents JSON user watched object
func (UserWatched) String ¶ added in v1.3.0
func (u UserWatched) String() string
type ValidationErrors ¶ added in v1.6.0
type ValidationErrors struct {
Errors *Errors `json:"errors,omitempty"` // errors object
}
ValidationErrors represents errors object
func (ValidationErrors) String ¶ added in v1.6.0
func (v ValidationErrors) String() string
Source Files
¶
- air.go
- calendar_list.go
- certification.go
- certifications.go
- character.go
- checkin.go
- collection.go
- comment.go
- comment_item.go
- comment_media_item.go
- comment_user_like.go
- connections.go
- crew.go
- current_device_token.go
- device_code.go
- device_token.go
- episode.go
- episodes.go
- error_response.go
- errors.go
- export_list_item.go
- favorites.go
- headers.go
- helpers.go
- history_list_item.go
- ids.go
- images.go
- job.go
- limits.go
- list.go
- list_comment.go
- metadata.go
- movie.go
- movies.go
- network.go
- new_device_code.go
- new_device_token.go
- notes.go
- options.go
- person.go
- person_shows.go
- personal_list.go
- podcast.go
- podcast_episode.go
- preson_item.go
- preson_movies.go
- rate.go
- ratings.go
- response.go
- saved_filter.go
- search.go
- search_list_item.go
- season.go
- seasons.go
- sharing.go
- sharing_text.go
- show.go
- shows.go
- slice.go
- social_ids.go
- strings.go
- timestamp.go
- token.go
- user_account.go
- user_like.go
- user_list_item.go
- user_profile.go
- user_settings.go
- user_stats.go
- user_watched.go
- validation_errors.go
- watchlist.go