Documentation ¶
Index ¶
- Constants
- Variables
- type Activity
- type ActivityAction
- type ActivityConnection
- type ActivityEdge
- type ActivityItem
- type ActivityOrder
- type ActivityOrderField
- type Cast
- type CastConnection
- type CastEdge
- type CastOrder
- type CastOrderField
- type Channel
- type ChannelConnection
- type ChannelEdge
- type ChannelGroup
- type Character
- type CharacterConnection
- type CharacterEdge
- type CharacterOrder
- type CharacterOrderField
- type Client
- func (c *Client) CreateRecordMutation(ctx context.Context, episodeID string, ...) (*CreateRecordMutationPayload, error)
- func (c *Client) GetProfile(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*GetProfile, error)
- func (c *Client) GetWork(ctx context.Context, ids []int64, ...) (*GetWork, error)
- func (c *Client) ListNextEpisodes(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*ListNextEpisodes, error)
- func (c *Client) ListRecords(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*ListRecords, error)
- func (c *Client) ListWorks(ctx context.Context, state *StatusState, after *string, n int64, ...) (*ListWorks, error)
- func (c *Client) UpdateStatusMutation(ctx context.Context, state StatusState, workID string, ...) (*UpdateStatusMutationPayload, error)
- func (c *Client) UpdateWorkStatus(ctx context.Context, workID string, ...) (*UpdateWorkStatusPayload, error)
- type CreateRecordInput
- type CreateRecordMutationPayload
- type CreateRecordPayload
- type CreateReviewInput
- type CreateReviewPayload
- type DeleteRecordInput
- type DeleteRecordPayload
- type DeleteReviewInput
- type DeleteReviewPayload
- type Episode
- type EpisodeConnection
- type EpisodeEdge
- type EpisodeOrder
- type EpisodeOrderField
- type GetProfile
- type GetWork
- type ListNextEpisodes
- type ListRecords
- type ListWorks
- type Media
- type MultipleRecord
- type Node
- type OrderDirection
- type Organization
- type OrganizationConnection
- type OrganizationEdge
- type OrganizationOrder
- type OrganizationOrderField
- type PageInfo
- type Person
- type PersonConnection
- type PersonEdge
- type PersonOrder
- type PersonOrderField
- type Prefecture
- type Program
- type ProgramConnection
- type ProgramEdge
- type ProgramOrder
- type ProgramOrderField
- type ProgramState
- type RatingState
- type Record
- type RecordConnection
- type RecordEdge
- type RecordOrder
- type RecordOrderField
- type Review
- type ReviewConnection
- type ReviewEdge
- type ReviewOrder
- type ReviewOrderField
- type SeasonName
- type Series
- type SeriesConnection
- type SeriesEdge
- type SeriesWorkConnection
- type SeriesWorkEdge
- type SeriesWorkOrder
- type SeriesWorkOrderField
- type Service
- type Staff
- type StaffConnection
- type StaffEdge
- type StaffOrder
- type StaffOrderField
- type StaffResourceItem
- type Status
- type StatusState
- type UpdateRecordInput
- type UpdateRecordPayload
- type UpdateReviewInput
- type UpdateReviewPayload
- type UpdateStatusInput
- type UpdateStatusMutationPayload
- type UpdateStatusPayload
- type UpdateWorkStatusPayload
- type User
- type UserConnection
- type UserEdge
- type Work
- type WorkConnection
- type WorkEdge
- type WorkImage
- type WorkOrder
- type WorkOrderField
Constants ¶
const CreateRecordMutationQuery = `mutation CreateRecordMutation ($episodeId: ID!) {
createRecord(input: {episodeId:$episodeId}) {
clientMutationId
}
}
`
const GetProfileQuery = `query GetProfile {
viewer {
avatarUrl
recordsCount
wannaWatchCount
watchingCount
watchedCount
}
}
`
const GetWorkQuery = `` /* 218-byte string literal not displayed */
const ListNextEpisodesQuery = `` /* 322-byte string literal not displayed */
const ListRecordsQuery = `` /* 240-byte string literal not displayed */
const ListWorksQuery = `` /* 366-byte string literal not displayed */
const UpdateStatusMutationQuery = `` /* 147-byte string literal not displayed */
const UpdateWorkStatusQuery = `mutation UpdateWorkStatus ($workId: ID!) {
updateStatus(input: {state:WATCHING,workId:$workId}) {
clientMutationId
}
}
`
Variables ¶
var AllActivityAction = []ActivityAction{ ActivityActionCreate, }
var AllActivityOrderField = []ActivityOrderField{ ActivityOrderFieldCreatedAt, }
var AllCastOrderField = []CastOrderField{ CastOrderFieldCreatedAt, CastOrderFieldSortNumber, }
var AllCharacterOrderField = []CharacterOrderField{ CharacterOrderFieldCreatedAt, CharacterOrderFieldFavoriteCharactersCount, }
var AllEpisodeOrderField = []EpisodeOrderField{ EpisodeOrderFieldCreatedAt, EpisodeOrderFieldSortNumber, }
var AllMedia = []Media{ MediaTv, MediaOva, MediaMovie, MediaWeb, MediaOther, }
var AllOrderDirection = []OrderDirection{ OrderDirectionAsc, OrderDirectionDesc, }
var AllOrganizationOrderField = []OrganizationOrderField{ OrganizationOrderFieldCreatedAt, OrganizationOrderFieldFavoriteOrganizationsCount, }
var AllPersonOrderField = []PersonOrderField{ PersonOrderFieldCreatedAt, PersonOrderFieldFavoritePeopleCount, }
var AllProgramOrderField = []ProgramOrderField{ ProgramOrderFieldStartedAt, }
var AllProgramState = []ProgramState{ ProgramStatePublished, ProgramStateHidden, }
var AllRatingState = []RatingState{ RatingStateGreat, RatingStateGood, RatingStateAverage, RatingStateBad, }
var AllRecordOrderField = []RecordOrderField{ RecordOrderFieldCreatedAt, RecordOrderFieldLikesCount, }
var AllReviewOrderField = []ReviewOrderField{ ReviewOrderFieldCreatedAt, ReviewOrderFieldLikesCount, }
var AllSeasonName = []SeasonName{ SeasonNameWinter, SeasonNameSpring, SeasonNameSummer, SeasonNameAutumn, }
var AllSeriesWorkOrderField = []SeriesWorkOrderField{ SeriesWorkOrderFieldSeason, }
var AllStaffOrderField = []StaffOrderField{ StaffOrderFieldCreatedAt, StaffOrderFieldSortNumber, }
var AllStatusState = []StatusState{ StatusStateWannaWatch, StatusStateWatching, StatusStateWatched, StatusStateOnHold, StatusStateStopWatching, StatusStateNoState, }
var AllWorkOrderField = []WorkOrderField{ WorkOrderFieldCreatedAt, WorkOrderFieldSeason, WorkOrderFieldWatchersCount, }
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type ActivityAction ¶
type ActivityAction string
const (
ActivityActionCreate ActivityAction = "CREATE"
)
func (ActivityAction) IsValid ¶
func (e ActivityAction) IsValid() bool
func (ActivityAction) MarshalGQL ¶
func (e ActivityAction) MarshalGQL(w io.Writer)
func (ActivityAction) String ¶
func (e ActivityAction) String() string
func (*ActivityAction) UnmarshalGQL ¶
func (e *ActivityAction) UnmarshalGQL(v interface{}) error
type ActivityConnection ¶
type ActivityConnection struct { // A list of edges. Edges []*ActivityEdge `json:"edges"` // A list of nodes. Nodes []*Activity `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Activity.
type ActivityEdge ¶
type ActivityEdge struct { Action ActivityAction `json:"action"` AnnictID int64 `json:"annictId"` // A cursor for use in pagination. Cursor string `json:"cursor"` Node ActivityItem `json:"node"` User *User `json:"user"` }
An edge in a connection.
type ActivityItem ¶
type ActivityItem interface {
IsActivityItem()
}
type ActivityOrder ¶
type ActivityOrder struct { Field ActivityOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type ActivityOrderField ¶
type ActivityOrderField string
const (
ActivityOrderFieldCreatedAt ActivityOrderField = "CREATED_AT"
)
func (ActivityOrderField) IsValid ¶
func (e ActivityOrderField) IsValid() bool
func (ActivityOrderField) MarshalGQL ¶
func (e ActivityOrderField) MarshalGQL(w io.Writer)
func (ActivityOrderField) String ¶
func (e ActivityOrderField) String() string
func (*ActivityOrderField) UnmarshalGQL ¶
func (e *ActivityOrderField) UnmarshalGQL(v interface{}) error
type Cast ¶
type CastConnection ¶
type CastConnection struct { // A list of edges. Edges []*CastEdge `json:"edges"` // A list of nodes. Nodes []*Cast `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Cast.
type CastEdge ¶
type CastEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Cast `json:"node"` }
An edge in a connection.
type CastOrder ¶
type CastOrder struct { Field CastOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type CastOrderField ¶
type CastOrderField string
const ( CastOrderFieldCreatedAt CastOrderField = "CREATED_AT" CastOrderFieldSortNumber CastOrderField = "SORT_NUMBER" )
func (CastOrderField) IsValid ¶
func (e CastOrderField) IsValid() bool
func (CastOrderField) MarshalGQL ¶
func (e CastOrderField) MarshalGQL(w io.Writer)
func (CastOrderField) String ¶
func (e CastOrderField) String() string
func (*CastOrderField) UnmarshalGQL ¶
func (e *CastOrderField) UnmarshalGQL(v interface{}) error
type Channel ¶
type Channel struct { AnnictID int64 `json:"annictId"` ChannelGroup *ChannelGroup `json:"channelGroup"` ID string `json:"id"` Name string `json:"name"` Programs *ProgramConnection `json:"programs"` Published bool `json:"published"` ScChid int64 `json:"scChid"` }
type ChannelConnection ¶
type ChannelConnection struct { // A list of edges. Edges []*ChannelEdge `json:"edges"` // A list of nodes. Nodes []*Channel `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Channel.
type ChannelEdge ¶
type ChannelEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Channel `json:"node"` }
An edge in a connection.
type ChannelGroup ¶
type ChannelGroup struct { AnnictID int64 `json:"annictId"` Channels *ChannelConnection `json:"channels"` ID string `json:"id"` Name string `json:"name"` SortNumber int64 `json:"sortNumber"` }
func (ChannelGroup) IsNode ¶
func (ChannelGroup) IsNode()
type Character ¶
type Character struct { Age string `json:"age"` AgeEn string `json:"ageEn"` AnnictID int64 `json:"annictId"` Birthday string `json:"birthday"` BirthdayEn string `json:"birthdayEn"` BloodType string `json:"bloodType"` BloodTypeEn string `json:"bloodTypeEn"` Description string `json:"description"` DescriptionEn string `json:"descriptionEn"` DescriptionSource string `json:"descriptionSource"` DescriptionSourceEn string `json:"descriptionSourceEn"` FavoriteCharactersCount int64 `json:"favoriteCharactersCount"` Height string `json:"height"` HeightEn string `json:"heightEn"` ID string `json:"id"` Name string `json:"name"` NameEn string `json:"nameEn"` NameKana string `json:"nameKana"` Nationality string `json:"nationality"` NationalityEn string `json:"nationalityEn"` Nickname string `json:"nickname"` NicknameEn string `json:"nicknameEn"` Occupation string `json:"occupation"` OccupationEn string `json:"occupationEn"` Series *Series `json:"series"` Weight string `json:"weight"` WeightEn string `json:"weightEn"` }
type CharacterConnection ¶
type CharacterConnection struct { // A list of edges. Edges []*CharacterEdge `json:"edges"` // A list of nodes. Nodes []*Character `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Character.
type CharacterEdge ¶
type CharacterEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Character `json:"node"` }
An edge in a connection.
type CharacterOrder ¶
type CharacterOrder struct { Field CharacterOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type CharacterOrderField ¶
type CharacterOrderField string
const ( CharacterOrderFieldCreatedAt CharacterOrderField = "CREATED_AT" CharacterOrderFieldFavoriteCharactersCount CharacterOrderField = "FAVORITE_CHARACTERS_COUNT" )
func (CharacterOrderField) IsValid ¶
func (e CharacterOrderField) IsValid() bool
func (CharacterOrderField) MarshalGQL ¶
func (e CharacterOrderField) MarshalGQL(w io.Writer)
func (CharacterOrderField) String ¶
func (e CharacterOrderField) String() string
func (*CharacterOrderField) UnmarshalGQL ¶
func (e *CharacterOrderField) UnmarshalGQL(v interface{}) error
type Client ¶
func (*Client) CreateRecordMutation ¶
func (c *Client) CreateRecordMutation(ctx context.Context, episodeID string, httpRequestOptions ...client.HTTPRequestOption) (*CreateRecordMutationPayload, error)
func (*Client) GetProfile ¶
func (c *Client) GetProfile(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*GetProfile, error)
func (*Client) ListNextEpisodes ¶
func (c *Client) ListNextEpisodes(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*ListNextEpisodes, error)
func (*Client) ListRecords ¶
func (c *Client) ListRecords(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*ListRecords, error)
func (*Client) ListWorks ¶
func (c *Client) ListWorks(ctx context.Context, state *StatusState, after *string, n int64, httpRequestOptions ...client.HTTPRequestOption) (*ListWorks, error)
func (*Client) UpdateStatusMutation ¶
func (c *Client) UpdateStatusMutation(ctx context.Context, state StatusState, workID string, httpRequestOptions ...client.HTTPRequestOption) (*UpdateStatusMutationPayload, error)
func (*Client) UpdateWorkStatus ¶
func (c *Client) UpdateWorkStatus(ctx context.Context, workID string, httpRequestOptions ...client.HTTPRequestOption) (*UpdateWorkStatusPayload, error)
type CreateRecordInput ¶
type CreateRecordInput struct { EpisodeID string `json:"episodeId"` Comment *string `json:"comment"` RatingState *RatingState `json:"ratingState"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` }
Autogenerated input type of CreateRecord
type CreateRecordMutationPayload ¶
type CreateRecordMutationPayload struct {
CreateRecord *struct{ ClientMutationID *string }
}
type CreateRecordPayload ¶
type CreateRecordPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` Record *Record `json:"record"` }
Autogenerated return type of CreateRecord
type CreateReviewInput ¶
type CreateReviewInput struct { WorkID string `json:"workId"` Title *string `json:"title"` Body string `json:"body"` RatingOverallState *RatingState `json:"ratingOverallState"` RatingAnimationState *RatingState `json:"ratingAnimationState"` RatingMusicState *RatingState `json:"ratingMusicState"` RatingStoryState *RatingState `json:"ratingStoryState"` RatingCharacterState *RatingState `json:"ratingCharacterState"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` }
Autogenerated input type of CreateReview
type CreateReviewPayload ¶
type CreateReviewPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` Review *Review `json:"review"` }
Autogenerated return type of CreateReview
type DeleteRecordInput ¶
type DeleteRecordInput struct { RecordID string `json:"recordId"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` }
Autogenerated input type of DeleteRecord
type DeleteRecordPayload ¶
type DeleteRecordPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` Episode *Episode `json:"episode"` }
Autogenerated return type of DeleteRecord
type DeleteReviewInput ¶
type DeleteReviewInput struct { ReviewID string `json:"reviewId"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` }
Autogenerated input type of DeleteReview
type DeleteReviewPayload ¶
type DeleteReviewPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` Work *Work `json:"work"` }
Autogenerated return type of DeleteReview
type Episode ¶
type Episode struct { AnnictID int64 `json:"annictId"` ID string `json:"id"` NextEpisode *Episode `json:"nextEpisode"` Number *int64 `json:"number"` NumberText *string `json:"numberText"` PrevEpisode *Episode `json:"prevEpisode"` RecordCommentsCount int64 `json:"recordCommentsCount"` Records *RecordConnection `json:"records"` RecordsCount int64 `json:"recordsCount"` SatisfactionRate *float64 `json:"satisfactionRate"` SortNumber int64 `json:"sortNumber"` Title *string `json:"title"` ViewerDidTrack bool `json:"viewerDidTrack"` ViewerRecordsCount int64 `json:"viewerRecordsCount"` Work *Work `json:"work"` }
An episode of a work
type EpisodeConnection ¶
type EpisodeConnection struct { // A list of edges. Edges []*EpisodeEdge `json:"edges"` // A list of nodes. Nodes []*Episode `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Episode.
type EpisodeEdge ¶
type EpisodeEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Episode `json:"node"` }
An edge in a connection.
type EpisodeOrder ¶
type EpisodeOrder struct { Field EpisodeOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type EpisodeOrderField ¶
type EpisodeOrderField string
const ( EpisodeOrderFieldCreatedAt EpisodeOrderField = "CREATED_AT" EpisodeOrderFieldSortNumber EpisodeOrderField = "SORT_NUMBER" )
func (EpisodeOrderField) IsValid ¶
func (e EpisodeOrderField) IsValid() bool
func (EpisodeOrderField) MarshalGQL ¶
func (e EpisodeOrderField) MarshalGQL(w io.Writer)
func (EpisodeOrderField) String ¶
func (e EpisodeOrderField) String() string
func (*EpisodeOrderField) UnmarshalGQL ¶
func (e *EpisodeOrderField) UnmarshalGQL(v interface{}) error
type GetProfile ¶
type ListNextEpisodes ¶
type ListNextEpisodes struct { Viewer *struct { Records *struct { Edges []*struct { Node *struct { Episode struct { NextEpisode *struct { ID string Number *int64 SortNumber int64 NumberText *string Title *string NextEpisode *struct{ ID string } } Work struct { ID string Title string ViewerStatusState *StatusState } } } } } } }
type ListRecords ¶
type ListWorks ¶
type ListWorks struct { Viewer *struct { Works *struct { Edges []*struct { Cursor string Node *struct { Title string AnnictID int64 SeasonYear *int64 SeasonName *SeasonName EpisodesCount int64 ID string OfficialSiteURL *string WikipediaURL *string ViewerStatusState *StatusState } } } } }
type Media ¶
type Media string
Media of anime
func (Media) MarshalGQL ¶
func (*Media) UnmarshalGQL ¶
type MultipleRecord ¶
type MultipleRecord struct { AnnictID int64 `json:"annictId"` CreatedAt string `json:"createdAt"` ID string `json:"id"` Records *RecordConnection `json:"records"` User *User `json:"user"` Work *Work `json:"work"` }
func (MultipleRecord) IsActivityItem ¶
func (MultipleRecord) IsActivityItem()
func (MultipleRecord) IsNode ¶
func (MultipleRecord) IsNode()
type OrderDirection ¶
type OrderDirection string
const ( OrderDirectionAsc OrderDirection = "ASC" OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) IsValid ¶
func (e OrderDirection) IsValid() bool
func (OrderDirection) MarshalGQL ¶
func (e OrderDirection) MarshalGQL(w io.Writer)
func (OrderDirection) String ¶
func (e OrderDirection) String() string
func (*OrderDirection) UnmarshalGQL ¶
func (e *OrderDirection) UnmarshalGQL(v interface{}) error
type Organization ¶
type Organization struct { AnnictID int64 `json:"annictId"` FavoriteOrganizationsCount int64 `json:"favoriteOrganizationsCount"` ID string `json:"id"` Name string `json:"name"` NameEn string `json:"nameEn"` NameKana string `json:"nameKana"` StaffsCount int64 `json:"staffsCount"` TwitterUsername string `json:"twitterUsername"` TwitterUsernameEn string `json:"twitterUsernameEn"` URL string `json:"url"` URLEn string `json:"urlEn"` WikipediaURL string `json:"wikipediaUrl"` WikipediaURLEn string `json:"wikipediaUrlEn"` }
func (Organization) IsNode ¶
func (Organization) IsNode()
func (Organization) IsStaffResourceItem ¶
func (Organization) IsStaffResourceItem()
type OrganizationConnection ¶
type OrganizationConnection struct { // A list of edges. Edges []*OrganizationEdge `json:"edges"` // A list of nodes. Nodes []*Organization `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Organization.
type OrganizationEdge ¶
type OrganizationEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Organization `json:"node"` }
An edge in a connection.
type OrganizationOrder ¶
type OrganizationOrder struct { Field OrganizationOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type OrganizationOrderField ¶
type OrganizationOrderField string
const ( OrganizationOrderFieldCreatedAt OrganizationOrderField = "CREATED_AT" OrganizationOrderFieldFavoriteOrganizationsCount OrganizationOrderField = "FAVORITE_ORGANIZATIONS_COUNT" )
func (OrganizationOrderField) IsValid ¶
func (e OrganizationOrderField) IsValid() bool
func (OrganizationOrderField) MarshalGQL ¶
func (e OrganizationOrderField) MarshalGQL(w io.Writer)
func (OrganizationOrderField) String ¶
func (e OrganizationOrderField) String() string
func (*OrganizationOrderField) UnmarshalGQL ¶
func (e *OrganizationOrderField) UnmarshalGQL(v interface{}) error
type PageInfo ¶
type PageInfo struct { // When paginating forwards, the cursor to continue. EndCursor *string `json:"endCursor"` // When paginating forwards, are there more items? HasNextPage bool `json:"hasNextPage"` // When paginating backwards, are there more items? HasPreviousPage bool `json:"hasPreviousPage"` // When paginating backwards, the cursor to continue. StartCursor *string `json:"startCursor"` }
Information about pagination in a connection.
type Person ¶
type Person struct { AnnictID int64 `json:"annictId"` Birthday string `json:"birthday"` BloodType string `json:"bloodType"` CastsCount int64 `json:"castsCount"` FavoritePeopleCount int64 `json:"favoritePeopleCount"` GenderText string `json:"genderText"` Height string `json:"height"` ID string `json:"id"` Name string `json:"name"` NameEn string `json:"nameEn"` NameKana string `json:"nameKana"` Nickname string `json:"nickname"` NicknameEn string `json:"nicknameEn"` Prefecture *Prefecture `json:"prefecture"` StaffsCount int64 `json:"staffsCount"` TwitterUsername string `json:"twitterUsername"` TwitterUsernameEn string `json:"twitterUsernameEn"` URL string `json:"url"` URLEn string `json:"urlEn"` WikipediaURL string `json:"wikipediaUrl"` WikipediaURLEn string `json:"wikipediaUrlEn"` }
func (Person) IsStaffResourceItem ¶
func (Person) IsStaffResourceItem()
type PersonConnection ¶
type PersonConnection struct { // A list of edges. Edges []*PersonEdge `json:"edges"` // A list of nodes. Nodes []*Person `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Person.
type PersonEdge ¶
type PersonEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Person `json:"node"` }
An edge in a connection.
type PersonOrder ¶
type PersonOrder struct { Field PersonOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type PersonOrderField ¶
type PersonOrderField string
const ( PersonOrderFieldCreatedAt PersonOrderField = "CREATED_AT" PersonOrderFieldFavoritePeopleCount PersonOrderField = "FAVORITE_PEOPLE_COUNT" )
func (PersonOrderField) IsValid ¶
func (e PersonOrderField) IsValid() bool
func (PersonOrderField) MarshalGQL ¶
func (e PersonOrderField) MarshalGQL(w io.Writer)
func (PersonOrderField) String ¶
func (e PersonOrderField) String() string
func (*PersonOrderField) UnmarshalGQL ¶
func (e *PersonOrderField) UnmarshalGQL(v interface{}) error
type Prefecture ¶
type Prefecture struct { AnnictID int64 `json:"annictId"` ID string `json:"id"` Name string `json:"name"` }
func (Prefecture) IsNode ¶
func (Prefecture) IsNode()
type Program ¶
type Program struct { AnnictID int64 `json:"annictId"` Channel *Channel `json:"channel"` Episode *Episode `json:"episode"` ID string `json:"id"` Rebroadcast bool `json:"rebroadcast"` ScPid *int64 `json:"scPid"` StartedAt string `json:"startedAt"` State ProgramState `json:"state"` Work *Work `json:"work"` }
type ProgramConnection ¶
type ProgramConnection struct { // A list of edges. Edges []*ProgramEdge `json:"edges"` // A list of nodes. Nodes []*Program `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Program.
type ProgramEdge ¶
type ProgramEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Program `json:"node"` }
An edge in a connection.
type ProgramOrder ¶
type ProgramOrder struct { Field ProgramOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type ProgramOrderField ¶
type ProgramOrderField string
const (
ProgramOrderFieldStartedAt ProgramOrderField = "STARTED_AT"
)
func (ProgramOrderField) IsValid ¶
func (e ProgramOrderField) IsValid() bool
func (ProgramOrderField) MarshalGQL ¶
func (e ProgramOrderField) MarshalGQL(w io.Writer)
func (ProgramOrderField) String ¶
func (e ProgramOrderField) String() string
func (*ProgramOrderField) UnmarshalGQL ¶
func (e *ProgramOrderField) UnmarshalGQL(v interface{}) error
type ProgramState ¶
type ProgramState string
const ( ProgramStatePublished ProgramState = "PUBLISHED" ProgramStateHidden ProgramState = "HIDDEN" )
func (ProgramState) IsValid ¶
func (e ProgramState) IsValid() bool
func (ProgramState) MarshalGQL ¶
func (e ProgramState) MarshalGQL(w io.Writer)
func (ProgramState) String ¶
func (e ProgramState) String() string
func (*ProgramState) UnmarshalGQL ¶
func (e *ProgramState) UnmarshalGQL(v interface{}) error
type RatingState ¶
type RatingState string
const ( RatingStateGreat RatingState = "GREAT" RatingStateGood RatingState = "GOOD" RatingStateAverage RatingState = "AVERAGE" RatingStateBad RatingState = "BAD" )
func (RatingState) IsValid ¶
func (e RatingState) IsValid() bool
func (RatingState) MarshalGQL ¶
func (e RatingState) MarshalGQL(w io.Writer)
func (RatingState) String ¶
func (e RatingState) String() string
func (*RatingState) UnmarshalGQL ¶
func (e *RatingState) UnmarshalGQL(v interface{}) error
type Record ¶
type Record struct { AnnictID int64 `json:"annictId"` Comment *string `json:"comment"` CommentsCount int64 `json:"commentsCount"` CreatedAt string `json:"createdAt"` Episode *Episode `json:"episode"` FacebookClickCount int64 `json:"facebookClickCount"` ID string `json:"id"` LikesCount int64 `json:"likesCount"` Modified bool `json:"modified"` Rating *float64 `json:"rating"` RatingState *RatingState `json:"ratingState"` TwitterClickCount int64 `json:"twitterClickCount"` UpdatedAt string `json:"updatedAt"` User *User `json:"user"` Work *Work `json:"work"` }
func (Record) IsActivityItem ¶
func (Record) IsActivityItem()
type RecordConnection ¶
type RecordConnection struct { // A list of edges. Edges []*RecordEdge `json:"edges"` // A list of nodes. Nodes []*Record `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Record.
type RecordEdge ¶
type RecordEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Record `json:"node"` }
An edge in a connection.
type RecordOrder ¶
type RecordOrder struct { Field RecordOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type RecordOrderField ¶
type RecordOrderField string
const ( RecordOrderFieldCreatedAt RecordOrderField = "CREATED_AT" RecordOrderFieldLikesCount RecordOrderField = "LIKES_COUNT" )
func (RecordOrderField) IsValid ¶
func (e RecordOrderField) IsValid() bool
func (RecordOrderField) MarshalGQL ¶
func (e RecordOrderField) MarshalGQL(w io.Writer)
func (RecordOrderField) String ¶
func (e RecordOrderField) String() string
func (*RecordOrderField) UnmarshalGQL ¶
func (e *RecordOrderField) UnmarshalGQL(v interface{}) error
type Review ¶
type Review struct { AnnictID int64 `json:"annictId"` Body string `json:"body"` CreatedAt string `json:"createdAt"` ID string `json:"id"` ImpressionsCount int64 `json:"impressionsCount"` LikesCount int64 `json:"likesCount"` ModifiedAt *string `json:"modifiedAt"` RatingAnimationState *RatingState `json:"ratingAnimationState"` RatingCharacterState *RatingState `json:"ratingCharacterState"` RatingMusicState *RatingState `json:"ratingMusicState"` RatingOverallState *RatingState `json:"ratingOverallState"` RatingStoryState *RatingState `json:"ratingStoryState"` Title *string `json:"title"` UpdatedAt string `json:"updatedAt"` User *User `json:"user"` Work *Work `json:"work"` }
func (Review) IsActivityItem ¶
func (Review) IsActivityItem()
type ReviewConnection ¶
type ReviewConnection struct { // A list of edges. Edges []*ReviewEdge `json:"edges"` // A list of nodes. Nodes []*Review `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Review.
type ReviewEdge ¶
type ReviewEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Review `json:"node"` }
An edge in a connection.
type ReviewOrder ¶
type ReviewOrder struct { Field ReviewOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type ReviewOrderField ¶
type ReviewOrderField string
const ( ReviewOrderFieldCreatedAt ReviewOrderField = "CREATED_AT" ReviewOrderFieldLikesCount ReviewOrderField = "LIKES_COUNT" )
func (ReviewOrderField) IsValid ¶
func (e ReviewOrderField) IsValid() bool
func (ReviewOrderField) MarshalGQL ¶
func (e ReviewOrderField) MarshalGQL(w io.Writer)
func (ReviewOrderField) String ¶
func (e ReviewOrderField) String() string
func (*ReviewOrderField) UnmarshalGQL ¶
func (e *ReviewOrderField) UnmarshalGQL(v interface{}) error
type SeasonName ¶
type SeasonName string
Season name
const ( SeasonNameWinter SeasonName = "WINTER" SeasonNameSpring SeasonName = "SPRING" SeasonNameSummer SeasonName = "SUMMER" SeasonNameAutumn SeasonName = "AUTUMN" )
func (SeasonName) IsValid ¶
func (e SeasonName) IsValid() bool
func (SeasonName) MarshalGQL ¶
func (e SeasonName) MarshalGQL(w io.Writer)
func (SeasonName) String ¶
func (e SeasonName) String() string
func (*SeasonName) UnmarshalGQL ¶
func (e *SeasonName) UnmarshalGQL(v interface{}) error
type Series ¶
type SeriesConnection ¶
type SeriesConnection struct { // A list of edges. Edges []*SeriesEdge `json:"edges"` // A list of nodes. Nodes []*Series `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Series.
type SeriesEdge ¶
type SeriesEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Series `json:"node"` }
An edge in a connection.
type SeriesWorkConnection ¶
type SeriesWorkConnection struct { // A list of edges. Edges []*SeriesWorkEdge `json:"edges"` // A list of nodes. Nodes []*Work `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Work.
type SeriesWorkEdge ¶
type SeriesWorkEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` Node *Work `json:"node"` Summary *string `json:"summary"` SummaryEn *string `json:"summaryEn"` }
An edge in a connection.
type SeriesWorkOrder ¶
type SeriesWorkOrder struct { Field SeriesWorkOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type SeriesWorkOrderField ¶
type SeriesWorkOrderField string
const (
SeriesWorkOrderFieldSeason SeriesWorkOrderField = "SEASON"
)
func (SeriesWorkOrderField) IsValid ¶
func (e SeriesWorkOrderField) IsValid() bool
func (SeriesWorkOrderField) MarshalGQL ¶
func (e SeriesWorkOrderField) MarshalGQL(w io.Writer)
func (SeriesWorkOrderField) String ¶
func (e SeriesWorkOrderField) String() string
func (*SeriesWorkOrderField) UnmarshalGQL ¶
func (e *SeriesWorkOrderField) UnmarshalGQL(v interface{}) error
type Service ¶
type Service interface { // GetProfile gets the profile of animekai account. GetProfile(ctx context.Context) (*resource.Profile, error) // ListWorks lists watched or watching works. // cursor is for paging, empty string if the first page. ListWorks( ctx context.Context, state StatusState, cursor string, limit int32, ) (_ []*resource.Work, nextCursor string, _ error) // CreateNextEpisodeRecords creates new records according to watching works. // If a created episode is the last episode, CreateNextEpisodeRecords marks the work state as WATCHED. CreateNextEpisodeRecords(ctx context.Context) ([]*resource.Episode, error) // UpdateWorkStatus updates the work identified by work's ID to the passed work state. UpdateWorkStatus(ctx context.Context, id int, state StatusState) error // Stop stops the service. Stop(ctx context.Context) error }
type Staff ¶
type Staff struct { AnnictID int64 `json:"annictId"` ID string `json:"id"` Name string `json:"name"` NameEn string `json:"nameEn"` Resource StaffResourceItem `json:"resource"` RoleOther string `json:"roleOther"` RoleOtherEn string `json:"roleOtherEn"` RoleText string `json:"roleText"` SortNumber int64 `json:"sortNumber"` Work *Work `json:"work"` }
type StaffConnection ¶
type StaffConnection struct { // A list of edges. Edges []*StaffEdge `json:"edges"` // A list of nodes. Nodes []*Staff `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Staff.
type StaffEdge ¶
type StaffEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Staff `json:"node"` }
An edge in a connection.
type StaffOrder ¶
type StaffOrder struct { Field StaffOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type StaffOrderField ¶
type StaffOrderField string
const ( StaffOrderFieldCreatedAt StaffOrderField = "CREATED_AT" StaffOrderFieldSortNumber StaffOrderField = "SORT_NUMBER" )
func (StaffOrderField) IsValid ¶
func (e StaffOrderField) IsValid() bool
func (StaffOrderField) MarshalGQL ¶
func (e StaffOrderField) MarshalGQL(w io.Writer)
func (StaffOrderField) String ¶
func (e StaffOrderField) String() string
func (*StaffOrderField) UnmarshalGQL ¶
func (e *StaffOrderField) UnmarshalGQL(v interface{}) error
type StaffResourceItem ¶
type StaffResourceItem interface {
IsStaffResourceItem()
}
type Status ¶
type Status struct { AnnictID int64 `json:"annictId"` CreatedAt string `json:"createdAt"` ID string `json:"id"` LikesCount int64 `json:"likesCount"` State StatusState `json:"state"` User *User `json:"user"` Work *Work `json:"work"` }
func (Status) IsActivityItem ¶
func (Status) IsActivityItem()
type StatusState ¶
type StatusState string
const ( StatusStateWannaWatch StatusState = "WANNA_WATCH" StatusStateWatching StatusState = "WATCHING" StatusStateWatched StatusState = "WATCHED" StatusStateOnHold StatusState = "ON_HOLD" StatusStateStopWatching StatusState = "STOP_WATCHING" StatusStateNoState StatusState = "NO_STATE" )
func (StatusState) IsValid ¶
func (e StatusState) IsValid() bool
func (StatusState) MarshalGQL ¶
func (e StatusState) MarshalGQL(w io.Writer)
func (StatusState) String ¶
func (e StatusState) String() string
func (*StatusState) UnmarshalGQL ¶
func (e *StatusState) UnmarshalGQL(v interface{}) error
type UpdateRecordInput ¶
type UpdateRecordInput struct { RecordID string `json:"recordId"` Comment *string `json:"comment"` RatingState *RatingState `json:"ratingState"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` }
Autogenerated input type of UpdateRecord
type UpdateRecordPayload ¶
type UpdateRecordPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` Record *Record `json:"record"` }
Autogenerated return type of UpdateRecord
type UpdateReviewInput ¶
type UpdateReviewInput struct { ReviewID string `json:"reviewId"` Title *string `json:"title"` Body string `json:"body"` RatingOverallState RatingState `json:"ratingOverallState"` RatingAnimationState RatingState `json:"ratingAnimationState"` RatingMusicState RatingState `json:"ratingMusicState"` RatingStoryState RatingState `json:"ratingStoryState"` RatingCharacterState RatingState `json:"ratingCharacterState"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` }
Autogenerated input type of UpdateReview
type UpdateReviewPayload ¶
type UpdateReviewPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` Review *Review `json:"review"` }
Autogenerated return type of UpdateReview
type UpdateStatusInput ¶
type UpdateStatusInput struct { WorkID string `json:"workId"` State StatusState `json:"state"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` }
Autogenerated input type of UpdateStatus
type UpdateStatusMutationPayload ¶
type UpdateStatusMutationPayload struct {
UpdateStatus *struct{ ClientMutationID *string }
}
type UpdateStatusPayload ¶
type UpdateStatusPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId"` Work *Work `json:"work"` }
Autogenerated return type of UpdateStatus
type UpdateWorkStatusPayload ¶
type UpdateWorkStatusPayload struct {
UpdateStatus *struct{ ClientMutationID *string }
}
type User ¶
type User struct { Activities *ActivityConnection `json:"activities"` AnnictID int64 `json:"annictId"` AvatarURL *string `json:"avatarUrl"` BackgroundImageURL *string `json:"backgroundImageUrl"` CreatedAt string `json:"createdAt"` Description string `json:"description"` Email *string `json:"email"` Followers *UserConnection `json:"followers"` FollowersCount int64 `json:"followersCount"` Following *UserConnection `json:"following"` FollowingActivities *ActivityConnection `json:"followingActivities"` FollowingsCount int64 `json:"followingsCount"` ID string `json:"id"` Name string `json:"name"` NotificationsCount *int64 `json:"notificationsCount"` OnHoldCount int64 `json:"onHoldCount"` Programs *ProgramConnection `json:"programs"` Records *RecordConnection `json:"records"` RecordsCount int64 `json:"recordsCount"` StopWatchingCount int64 `json:"stopWatchingCount"` URL *string `json:"url"` Username string `json:"username"` ViewerCanFollow bool `json:"viewerCanFollow"` ViewerIsFollowing bool `json:"viewerIsFollowing"` WannaWatchCount int64 `json:"wannaWatchCount"` WatchedCount int64 `json:"watchedCount"` WatchingCount int64 `json:"watchingCount"` Works *WorkConnection `json:"works"` }
type UserConnection ¶
type UserConnection struct { // A list of edges. Edges []*UserEdge `json:"edges"` // A list of nodes. Nodes []*User `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for User.
type UserEdge ¶
type UserEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *User `json:"node"` }
An edge in a connection.
type Work ¶
type Work struct { AnnictID int64 `json:"annictId"` Casts *CastConnection `json:"casts"` Episodes *EpisodeConnection `json:"episodes"` EpisodesCount int64 `json:"episodesCount"` ID string `json:"id"` Image *WorkImage `json:"image"` MalAnimeID *string `json:"malAnimeId"` Media Media `json:"media"` NoEpisodes bool `json:"noEpisodes"` OfficialSiteURL *string `json:"officialSiteUrl"` OfficialSiteURLEn *string `json:"officialSiteUrlEn"` Programs *ProgramConnection `json:"programs"` Reviews *ReviewConnection `json:"reviews"` ReviewsCount int64 `json:"reviewsCount"` SatisfactionRate *float64 `json:"satisfactionRate"` SeasonName *SeasonName `json:"seasonName"` SeasonYear *int64 `json:"seasonYear"` SeriesList *SeriesConnection `json:"seriesList"` Staffs *StaffConnection `json:"staffs"` SyobocalTid *int64 `json:"syobocalTid"` Title string `json:"title"` TitleEn *string `json:"titleEn"` TitleKana *string `json:"titleKana"` TitleRo *string `json:"titleRo"` TwitterHashtag *string `json:"twitterHashtag"` TwitterUsername *string `json:"twitterUsername"` ViewerStatusState *StatusState `json:"viewerStatusState"` WatchersCount int64 `json:"watchersCount"` WikipediaURL *string `json:"wikipediaUrl"` WikipediaURLEn *string `json:"wikipediaUrlEn"` }
An anime title
type WorkConnection ¶
type WorkConnection struct { // A list of edges. Edges []*WorkEdge `json:"edges"` // A list of nodes. Nodes []*Work `json:"nodes"` // Information to aid in pagination. PageInfo *PageInfo `json:"pageInfo"` }
The connection type for Work.
type WorkEdge ¶
type WorkEdge struct { // A cursor for use in pagination. Cursor string `json:"cursor"` // The item at the end of the edge. Node *Work `json:"node"` }
An edge in a connection.
type WorkImage ¶
type WorkImage struct { AnnictID *int64 `json:"annictId"` FacebookOgImageURL *string `json:"facebookOgImageUrl"` ID string `json:"id"` InternalURL *string `json:"internalUrl"` RecommendedImageURL *string `json:"recommendedImageUrl"` TwitterAvatarURL *string `json:"twitterAvatarUrl"` TwitterBiggerAvatarURL *string `json:"twitterBiggerAvatarUrl"` TwitterMiniAvatarURL *string `json:"twitterMiniAvatarUrl"` TwitterNormalAvatarURL *string `json:"twitterNormalAvatarUrl"` Work *Work `json:"work"` }
type WorkOrder ¶
type WorkOrder struct { Field WorkOrderField `json:"field"` Direction OrderDirection `json:"direction"` }
type WorkOrderField ¶
type WorkOrderField string
const ( WorkOrderFieldCreatedAt WorkOrderField = "CREATED_AT" WorkOrderFieldSeason WorkOrderField = "SEASON" WorkOrderFieldWatchersCount WorkOrderField = "WATCHERS_COUNT" )
func (WorkOrderField) IsValid ¶
func (e WorkOrderField) IsValid() bool
func (WorkOrderField) MarshalGQL ¶
func (e WorkOrderField) MarshalGQL(w io.Writer)
func (WorkOrderField) String ¶
func (e WorkOrderField) String() string
func (*WorkOrderField) UnmarshalGQL ¶
func (e *WorkOrderField) UnmarshalGQL(v interface{}) error