Documentation
¶
Index ¶
- Constants
- func New(anilistEndpoint string, pageSize int) usecases.Tracker
- func NewGraphQLClient(anilistEndpoint string) graphql.Client
- func NewRatedClient(interval time.Duration, requests int, base *http.Client) graphql.Doer
- type GetUserByNameResponse
- type GetUserByNameUser
- type GetWatchingPage
- type GetWatchingPageMediaList
- type GetWatchingPageMediaListMedia
- type GetWatchingPageMediaListMediaTitle
- type GetWatchingResponse
- type Tracker
Constants ¶
const GetUserByName_Operation = `
query GetUserByName ($name: String!) {
User(name: $name) {
id
}
}
`
The query or mutation executed by GetUserByName.
const GetWatching_Operation = `` /* 239-byte string literal not displayed */
The query or mutation executed by GetWatching.
Variables ¶
This section is empty.
Functions ¶
func NewGraphQLClient ¶
Types ¶
type GetUserByNameResponse ¶
type GetUserByNameResponse struct { // User query User GetUserByNameUser `json:"User"` }
GetUserByNameResponse is returned by GetUserByName on success.
func GetUserByName ¶
func (*GetUserByNameResponse) GetUser ¶
func (v *GetUserByNameResponse) GetUser() GetUserByNameUser
GetUser returns GetUserByNameResponse.User, and is useful for accessing the field via an interface.
type GetUserByNameUser ¶
type GetUserByNameUser struct { // The id of the user Id int `json:"id"` }
GetUserByNameUser includes the requested fields of the GraphQL type User. The GraphQL type's documentation follows.
A user
func (*GetUserByNameUser) GetId ¶
func (v *GetUserByNameUser) GetId() int
GetId returns GetUserByNameUser.Id, and is useful for accessing the field via an interface.
type GetWatchingPage ¶
type GetWatchingPage struct {
MediaList []GetWatchingPageMediaList `json:"mediaList"`
}
GetWatchingPage includes the requested fields of the GraphQL type Page. The GraphQL type's documentation follows.
Page of data
func (*GetWatchingPage) GetMediaList ¶
func (v *GetWatchingPage) GetMediaList() []GetWatchingPageMediaList
GetMediaList returns GetWatchingPage.MediaList, and is useful for accessing the field via an interface.
type GetWatchingPageMediaList ¶
type GetWatchingPageMediaList struct {
Media GetWatchingPageMediaListMedia `json:"media"`
}
GetWatchingPageMediaList includes the requested fields of the GraphQL type MediaList. The GraphQL type's documentation follows.
List of anime or manga
func (*GetWatchingPageMediaList) GetMedia ¶
func (v *GetWatchingPageMediaList) GetMedia() GetWatchingPageMediaListMedia
GetMedia returns GetWatchingPageMediaList.Media, and is useful for accessing the field via an interface.
type GetWatchingPageMediaListMedia ¶
type GetWatchingPageMediaListMedia struct { // The id of the media Id int `json:"id"` // The mal id of the media IdMal int `json:"idMal"` // The official titles of the media in various languages Title GetWatchingPageMediaListMediaTitle `json:"title"` }
GetWatchingPageMediaListMedia includes the requested fields of the GraphQL type Media. The GraphQL type's documentation follows.
Anime or Manga
func (*GetWatchingPageMediaListMedia) GetId ¶
func (v *GetWatchingPageMediaListMedia) GetId() int
GetId returns GetWatchingPageMediaListMedia.Id, and is useful for accessing the field via an interface.
func (*GetWatchingPageMediaListMedia) GetIdMal ¶
func (v *GetWatchingPageMediaListMedia) GetIdMal() int
GetIdMal returns GetWatchingPageMediaListMedia.IdMal, and is useful for accessing the field via an interface.
func (*GetWatchingPageMediaListMedia) GetTitle ¶
func (v *GetWatchingPageMediaListMedia) GetTitle() GetWatchingPageMediaListMediaTitle
GetTitle returns GetWatchingPageMediaListMedia.Title, and is useful for accessing the field via an interface.
type GetWatchingPageMediaListMediaTitle ¶
type GetWatchingPageMediaListMediaTitle struct { // The romanization of the native language title Romaji string `json:"romaji"` }
GetWatchingPageMediaListMediaTitle includes the requested fields of the GraphQL type MediaTitle. The GraphQL type's documentation follows.
The official titles of the media in various languages
func (*GetWatchingPageMediaListMediaTitle) GetRomaji ¶
func (v *GetWatchingPageMediaListMediaTitle) GetRomaji() string
GetRomaji returns GetWatchingPageMediaListMediaTitle.Romaji, and is useful for accessing the field via an interface.
type GetWatchingResponse ¶
type GetWatchingResponse struct {
Page GetWatchingPage `json:"Page"`
}
GetWatchingResponse is returned by GetWatching on success.
func GetWatching ¶
func (*GetWatchingResponse) GetPage ¶
func (v *GetWatchingResponse) GetPage() GetWatchingPage
GetPage returns GetWatchingResponse.Page, and is useful for accessing the field via an interface.
type Tracker ¶
Tracker abstracts an Anilist GraphQL client and provides the common requests needed by MediaLister