Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRateLimited = errors.New("rate limited") ErrServerError = errors.New("server error") )
Functions ¶
This section is empty.
Types ¶
type AniListClient ¶
type AniListClient struct {
// contains filtered or unexported fields
}
func NewAniListClient ¶
func NewAniListClient(httpClient *http.Client) *AniListClient
func (*AniListClient) FetchMediaAll ¶
func (c *AniListClient) FetchMediaAll(ctx context.Context) ([]*AniListMediaQuery, error)
type AniListMediaQuery ¶
type AniListMediaQuery struct { Page struct { Media []struct { Title struct { English *string `graphql:"english" json:"english"` Romaji *string `graphql:"romaji" json:"romaji"` Native *string `graphql:"native" json:"native"` } `graphql:"title" json:"title"` } `graphql:"media(sort: ID, type: ANIME, countryOfOrigin: JP)" json:"media"` PageInfo struct { HasNextPage bool `graphql:"hasNextPage" json:"hasNextPage"` } `graphql:"pageInfo" json:"pageInfo"` } `graphql:"Page(page: $page, perPage: 50)" json:"page"` }
type CachingAniListClient ¶
type CachingAniListClient struct { *AniListClient // contains filtered or unexported fields }
func NewCachingAniListClient ¶
func NewCachingAniListClient(client *AniListClient, cacheDir string) (*CachingAniListClient, error)
func (*CachingAniListClient) FetchMediaAll ¶
func (c *CachingAniListClient) FetchMediaAll(ctx context.Context) ([]*AniListMediaQuery, error)
type CachingMALClient ¶
type CachingMALClient struct { *MALClient // contains filtered or unexported fields }
func NewCachingMALClient ¶
func NewCachingMALClient(client *MALClient, cacheDir string) (*CachingMALClient, error)
func (*CachingMALClient) FetchMediaAll ¶
func (c *CachingMALClient) FetchMediaAll(ctx context.Context) ([]*MALMediaEntry, error)
type MALClient ¶
type MALClient struct {
// contains filtered or unexported fields
}
func NewMALClient ¶
func (*MALClient) FetchMediaAll ¶
func (c *MALClient) FetchMediaAll(ctx context.Context) ([]*MALMediaEntry, error)
type MALMediaEntry ¶
Click to show internal directories.
Click to hide internal directories.