Documentation
¶
Index ¶
- func SetLogger(logger *zap.Logger)
- type AlternativeTitles
- type Anime
- type AnimeListOptions
- type AnimeRanking
- type AnimeRankingPage
- type AnimeSearch
- type AnimeSearchPage
- type AnimeStatistics
- type AnimeStudio
- type AnimeUpdateResponse
- type ApiError
- type Broadcast
- type Client
- func (client *Client) DeleteAnimeListItem(animeID int) error
- func (client *Client) GetAnimeDetails(animeID int, opts ...OptFn) (*Anime, error)
- func (client *Client) GetAnimeRanking(ranking RankingType, opts ...OptFn) (*AnimeRankingPage, error)
- func (client *Client) GetMyAnimeList(opts AnimeListOptions, commonOpts ...OptFn) (*UserAnimePage, error)
- func (client *Client) GetMyUserInformation(opts ...OptFn) (*AnimeStatistics, error)
- func (client *Client) GetSeasonalAnime(year int, season Season, opts ...OptFn) (*SeasonalAnimePage, error)
- func (client *Client) GetSuggestedAnime(opts ...OptFn) (*SuggestedAnimePage, error)
- func (client *Client) GetUserAnimeList(user string, opts AnimeListOptions, commonOpts ...OptFn) (*UserAnimePage, error)
- func (client *Client) SearchAnime(q string, opts ...OptFn) (*AnimeSearchPage, error)
- func (client *Client) SetDebug(b bool)
- func (client *Client) UpdateAnimeList(animeID int, opts *UpdateListOptsBuilder) (*AnimeUpdateResponse, error)
- type Genre
- type MyListStatus
- type MyUserInformation
- type OAuth
- type OptFn
- type Paging
- type Picture
- type RankingType
- type Season
- type SeasonInfo
- type SeasonalAnime
- type SeasonalAnimePage
- type SeasonalSort
- type SortOpt
- type StatusOpt
- type SuggestedAnime
- type SuggestedAnimePage
- type UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) Comments(comments string) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) IsRewatching(rewatching bool) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) NumTimesRewatched(n int) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) NumWatchedEpisodes(eps int) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) Priority(p int) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) RewatchValue(v int) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) Score(score int) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) Status(s StatusOpt) *UpdateListOptsBuilder
- func (b *UpdateListOptsBuilder) Tags(tags string) *UpdateListOptsBuilder
- type UserAnime
- type UserAnimePage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlternativeTitles ¶
type Anime ¶
type Anime struct { ID int `json:"id,omitempty"` Title string `json:"title,omitempty"` MainPicture Picture `json:"main_picture,omitempty"` AlternativeTitles AlternativeTitles `json:"alternative_titles,omitempty"` StartDate string `json:"start_date,omitempty"` EndDate string `json:"end_date,omitempty"` Synopsis string `json:"synopsis,omitempty"` Mean float64 `json:"mean,omitempty"` Rank int `json:"rank,omitempty"` Popularity int `json:"popularity,omitempty"` NumListUsers int `json:"num_list_users,omitempty"` NumScoringUsers int `json:"num_scoring_users,omitempty"` Nsfw string `json:"nsfw,omitempty"` Genres []Genre `json:"genres,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` MediaType string `json:"media_type,omitempty"` Status string `json:"status,omitempty"` MyListStatus MyListStatus `json:"my_list_status,omitempty"` NumEpisodes int `json:"num_episodes,omitempty"` StartSeason SeasonInfo `json:"start_season,omitempty"` Broadcast Broadcast `json:"broadcast,omitempty"` Source string `json:"source,omitempty"` AverageEpisodeDuration int `json:"average_episode_duration,omitempty"` Rating string `json:"rating,omitempty"` Studios []AnimeStudio `json:"studios,omitempty"` }
type AnimeListOptions ¶
func (AnimeListOptions) Set ¶
func (opts AnimeListOptions) Set(v url.Values)
type AnimeRanking ¶
type AnimeRankingPage ¶
type AnimeRankingPage struct { Data []AnimeRanking `json:"data,omitempty"` Paging Paging `json:"paging,omitempty"` }
func (*AnimeRankingPage) NextPage ¶
func (ranking *AnimeRankingPage) NextPage(client *Client) (*AnimeRankingPage, error)
func (*AnimeRankingPage) PrevPage ¶
func (ranking *AnimeRankingPage) PrevPage(client *Client) (*AnimeRankingPage, error)
type AnimeSearch ¶
type AnimeSearch struct {
Node Anime `json:"node,omitempty"`
}
type AnimeSearchPage ¶
type AnimeSearchPage struct { Data []AnimeSearch `json:"data,omitempty"` Paging Paging `json:"paging,omitempty"` }
func (*AnimeSearchPage) NextPage ¶
func (search *AnimeSearchPage) NextPage(client *Client) (*AnimeSearchPage, error)
func (*AnimeSearchPage) PrevPage ¶
func (search *AnimeSearchPage) PrevPage(client *Client) (*AnimeSearchPage, error)
type AnimeStatistics ¶
type AnimeStatistics struct { NumItemsWatching int `json:"num_items_watching,omitempty"` NumItemsCompleted int `json:"num_items_completed,omitempty"` NumItemsOnHold int `json:"num_items_on_hold,omitempty"` NumItemsDropped int `json:"num_items_dropped,omitempty"` NumItemsPlanToWatch int `json:"num_items_plan_to_watch,omitempty"` NumItems int `json:"num_items,omitempty"` NumDaysWatched float64 `json:"num_days_watched,omitempty"` NumDaysWatching float64 `json:"num_days_watching,omitempty"` NumDaysCompleted float64 `json:"num_days_completed,omitempty"` NumDaysOnHold int `json:"num_days_on_hold,omitempty"` NumDaysDropped int `json:"num_days_dropped,omitempty"` NumDays float64 `json:"num_days,omitempty"` NumEpisodes int `json:"num_episodes,omitempty"` NumTimesRewatched int `json:"num_times_rewatched,omitempty"` MeanScore float64 `json:"mean_score,omitempty"` }
type AnimeStudio ¶
type AnimeUpdateResponse ¶
type AnimeUpdateResponse struct { Status string `json:"status,omitempty"` Score int `json:"score,omitempty"` NumEpisodesWatched int `json:"num_episodes_watched,omitempty"` IsRewatching bool `json:"is_rewatching,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Priority int `json:"priority,omitempty"` NumTimesRewatched int `json:"num_times_rewatched,omitempty"` RewatchValue int `json:"rewatch_value,omitempty"` Tags []string `json:"tags,omitempty"` Comments string `json:"comments,omitempty"` }
type ApiError ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteAnimeListItem ¶
func (*Client) GetAnimeDetails ¶
func (*Client) GetAnimeRanking ¶
func (client *Client) GetAnimeRanking(ranking RankingType, opts ...OptFn) (*AnimeRankingPage, error)
func (*Client) GetMyAnimeList ¶
func (client *Client) GetMyAnimeList(opts AnimeListOptions, commonOpts ...OptFn) (*UserAnimePage, error)
func (*Client) GetMyUserInformation ¶
func (client *Client) GetMyUserInformation(opts ...OptFn) (*AnimeStatistics, error)
func (*Client) GetSeasonalAnime ¶
func (*Client) GetSuggestedAnime ¶
func (client *Client) GetSuggestedAnime(opts ...OptFn) (*SuggestedAnimePage, error)
func (*Client) GetUserAnimeList ¶
func (client *Client) GetUserAnimeList(user string, opts AnimeListOptions, commonOpts ...OptFn) (*UserAnimePage, error)
func (*Client) SearchAnime ¶
func (client *Client) SearchAnime(q string, opts ...OptFn) (*AnimeSearchPage, error)
func (*Client) UpdateAnimeList ¶
func (client *Client) UpdateAnimeList(animeID int, opts *UpdateListOptsBuilder) (*AnimeUpdateResponse, error)
type MyListStatus ¶
type MyListStatus struct { Status string `json:"status,omitempty"` Score int `json:"score,omitempty"` // TODO: num_episodes_watched or num_watched_episodes NumEpisodesWatched int `json:"num_episodes_watched,omitempty"` IsRewatching bool `json:"is_rewatching,omitempty"` StartDate string `json:"start_date,omitempty"` FinishDate string `json:"finish_date,omitempty"` Priority int `json:"priority,omitempty"` NumTimesRewatched int `json:"num_times_rewatched,omitempty"` RewatchValue int `json:"rewatch_value,omitempty"` Tags []string `json:"tags,omitempty"` Comments string `json:"comments,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` }
type MyUserInformation ¶
type MyUserInformation struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` Location string `json:"location,omitempty"` JoinedAt string `json:"joined_at,omitempty"` AnimeStatistics AnimeStatistics `json:"anime_statistics,omitempty"` }
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func (*OAuth) NewCodeVerifier ¶
type OptFn ¶
func SortSeasonalAnime ¶
func SortSeasonalAnime(sort SeasonalSort) OptFn
type Paging ¶
type RankingType ¶
type RankingType string
const ( RankingAll RankingType = "all" RankingAiring RankingType = "airing" RankingUpcoming RankingType = "upcoming" RankingTV RankingType = "tv" RankingOVA RankingType = "ova" RankingMovie RankingType = "movie" RankingSpecial RankingType = "special" RankingByPopularity RankingType = "bypopularity" RankingFavorite RankingType = "favorite" )
type SeasonInfo ¶
type SeasonalAnime ¶
type SeasonalAnime struct {
Node Anime `json:"node,omitempty"`
}
type SeasonalAnimePage ¶
type SeasonalAnimePage struct { Data []AnimeSearch `json:"data,omitempty"` Paging Paging `json:"paging,omitempty"` Season Season `json:"season,omitempty"` }
func (*SeasonalAnimePage) NextPage ¶
func (seasonal *SeasonalAnimePage) NextPage(client *Client) (*SeasonalAnimePage, error)
func (*SeasonalAnimePage) PrevPage ¶
func (seasonal *SeasonalAnimePage) PrevPage(client *Client) (*SeasonalAnimePage, error)
type SeasonalSort ¶
type SeasonalSort string
const ( SeasonalSortAnimeScore SeasonalSort = "anime_score" SeasonalSortAnimeNumListUsers SeasonalSort = "anime_num_list_users" )
type SuggestedAnime ¶
type SuggestedAnime struct {
Node Anime `json:"node,omitempty"`
}
type SuggestedAnimePage ¶
type SuggestedAnimePage struct { Data []SuggestedAnime `json:"data,omitempty"` Paging Paging `json:"paging,omitempty"` }
func (*SuggestedAnimePage) NextPage ¶
func (suggested *SuggestedAnimePage) NextPage(client *Client) (*SuggestedAnimePage, error)
func (*SuggestedAnimePage) PrevPage ¶
func (suggested *SuggestedAnimePage) PrevPage(client *Client) (*SuggestedAnimePage, error)
type UpdateListOptsBuilder ¶
type UpdateListOptsBuilder struct {
// contains filtered or unexported fields
}
func UpdateListOpts ¶
func UpdateListOpts() *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) Comments ¶
func (b *UpdateListOptsBuilder) Comments(comments string) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) IsRewatching ¶
func (b *UpdateListOptsBuilder) IsRewatching(rewatching bool) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) NumTimesRewatched ¶
func (b *UpdateListOptsBuilder) NumTimesRewatched(n int) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) NumWatchedEpisodes ¶
func (b *UpdateListOptsBuilder) NumWatchedEpisodes(eps int) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) Priority ¶
func (b *UpdateListOptsBuilder) Priority(p int) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) RewatchValue ¶
func (b *UpdateListOptsBuilder) RewatchValue(v int) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) Score ¶
func (b *UpdateListOptsBuilder) Score(score int) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) Status ¶
func (b *UpdateListOptsBuilder) Status(s StatusOpt) *UpdateListOptsBuilder
func (*UpdateListOptsBuilder) Tags ¶
func (b *UpdateListOptsBuilder) Tags(tags string) *UpdateListOptsBuilder
type UserAnime ¶
type UserAnime struct { Node Anime `json:"node,omitempty"` ListStatus MyListStatus `json:"list_status,omitempty"` }
type UserAnimePage ¶
type UserAnimePage struct { Data []UserAnime `json:"data,omitempty"` Paging Paging `json:"paging,omitempty"` }
func (*UserAnimePage) NextPage ¶
func (userAnime *UserAnimePage) NextPage(client *Client) (*UserAnimePage, error)
func (*UserAnimePage) PrevPage ¶
func (userAnime *UserAnimePage) PrevPage(client *Client) (*UserAnimePage, error)
Click to show internal directories.
Click to hide internal directories.