anitrack/AniListTypes.go

199 lines
5.8 KiB
Go
Raw Normal View History

2024-07-24 09:15:52 -04:00
package main
type AniListJWT struct {
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
type AniListUser struct {
Data struct {
Viewer struct {
2024-07-30 20:35:21 -04:00
ID int `json:"id"`
Name string `json:"name"`
Avatar struct {
Large string `json:"large"`
Medium string `json:"medium"`
} `json:"avatar"`
BannerImage string `json:"bannerImage"`
SiteUrl string `json:"siteUrl"`
} `json:"Viewer"`
} `json:"data"`
}
type AniListCurrentUserWatchList struct {
Data struct {
Page struct {
PageInfo struct {
Total int `json:"total"`
PerPage int `json:"perPage"`
CurrentPage int `json:"currentPage"`
LastPage int `json:"lastPage"`
HasNextPage bool `json:"hasNextPage"`
} `json:"pageInfo"`
MediaList []MediaList `json:"mediaList"`
} `json:"Page"`
} `json:"data"`
}
type AniListGetSingleAnime struct {
Data struct {
MediaList MediaList `json:"MediaList"`
} `json:"data"`
}
type MediaList struct {
ID int `json:"id"`
MediaID int `json:"mediaId"`
UserID int `json:"userId"`
Media struct {
ID int `json:"id"`
IDMal int `json:"idMal"`
Title struct {
Romaji string `json:"romaji"`
English string `json:"english"`
Native string `json:"native"`
} `json:"title"`
Description string `json:"description"`
CoverImage struct {
Large string `json:"large"`
} `json:"coverImage"`
Season string `json:"season"`
SeasonYear int `json:"seasonYear"`
Status string `json:"status"`
Episodes int `json:"episodes"`
NextAiringEpisode struct {
AiringAt int `json:"airingAt"`
TimeUntilAiring int `json:"timeUntilAiring"`
Episode int `json:"episode"`
} `json:"nextAiringEpisode"`
Tags []struct {
Id int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Rank int `json:"rank"`
IsMediaSpoiler bool `json:"isMediaSpoiler"`
IsAdult bool `json:"isAdult"`
} `json:"tags"`
IsAdult bool `json:"isAdult"`
} `json:"media"`
2024-07-27 12:57:36 -04:00
Status string `json:"status"`
StartedAt struct {
Year int `json:"year"`
Month int `json:"month"`
Day int `json:"day"`
} `json:"startedAt"`
CompletedAt struct {
Year int `json:"year"`
Month int `json:"month"`
Day int `json:"day"`
} `json:"completedAt"`
Notes string `json:"notes"`
Progress int `json:"progress"`
Score float64 `json:"score"`
Repeat int `json:"repeat"`
User struct {
ID int `json:"id"`
Name string `json:"name"`
Avatar struct {
Large string `json:"large"`
Medium string `json:"medium"`
} `json:"avatar"`
Statistics struct {
Anime struct {
Count int `json:"count"`
Statuses []struct {
Status string `json:"status"`
Count int `json:"count"`
} `json:"statuses"`
} `json:"anime"`
} `json:"statistics"`
} `json:"user"`
}
2024-08-16 15:04:34 -04:00
type StartedAt struct {
Year int `json:"year"`
Month int `json:"month"`
Day int `json:"day"`
}
type CompletedAt struct {
Year int `json:"year"`
Month int `json:"month"`
Day int `json:"day"`
}
type AniListUpdateVariables struct {
MediaId int `json:"mediaId"`
Progress int `json:"progress"`
Status string `json:"status"`
Score float64 `json:"score"`
Repeat int `json:"repeat"`
Notes string `json:"notes"`
StartedAt StartedAt `json:"startedAt"`
CompletedAt CompletedAt `json:"completedAt"`
}
//var MediaListSort = struct {
// MediaId string
// MediaIdDesc string
// Score string
// ScoreDesc string
// Status string
// StatusDesc string
// Progress string
// ProgressDesc string
// ProgressVolumes string
// ProgressVolumesDesc string
// Repeat string
// RepeatDesc string
// Priority string
// PriorityDesc string
// StartedOn string
// StartedOnDesc string
// FinishedOn string
// FinishedOnDesc string
// AddedTime string
// AddedTimeDesc string
// UpdatedTime string
// UpdatedTimeDesc string
// MediaTitleRomaji string
// MediaTitleRomajiDesc string
// MediaTitleEnglish string
// MediaTitleEnglishDesc string
// MediaTitleNative string
// MediaTitleNativeDesc string
// MediaPopularity string
// MediaPopularityDesc string
//}{
// MediaId: "MEDIA_ID",
// MediaIdDesc: "MEDIA_ID_DESC",
// Score: "SCORE",
// ScoreDesc: "SCORE_DESC",
// Status: "STATUS",
// StatusDesc: "STATUS_DESC",
// Progress: "PROGRESS",
// ProgressDesc: "PROGRESS_DESC",
// ProgressVolumes: "PROGRESS_VOLUMES",
// ProgressVolumesDesc: "PROGRESS_VOLUMES_DESC",
// Repeat: "REPEAT",
// RepeatDesc: "REPEAT_DESC",
// Priority: "PRIORITY",
// PriorityDesc: "PRIORITY_DESC",
// StartedOn: "STARTED_ON",
// StartedOnDesc: "STARTED_ON_DESC",
// FinishedOn: "FINISHED_ON",
// FinishedOnDesc: "FINISHED_ON_DESC",
// AddedTime: "ADDED_TIME",
// AddedTimeDesc: "ADDED_TIME_DESC",
// UpdatedTime: "UPDATED_TIME",
// UpdatedTimeDesc: "UPDATED_TIME_DESC",
// MediaTitleRomaji: "MEDIA_TITLE_ROMAJI",
// MediaTitleRomajiDesc: "MEDIA_TITLE_ROMAJI_DESC",
// MediaTitleEnglish: "MEDIA_TITLE_ENGLISH",
// MediaTitleEnglishDesc: "MEDIA_TITLE_ENGLISH_DESC",
// MediaTitleNative: "MEDIA_TITLE_NATIVE",
// MediaTitleNativeDesc: "MEDIA_TITLE_NATIVE_DESC",
// MediaPopularity: "MEDIA_POPULARITY",
// MediaPopularityDesc: "MEDIA_POPULARITY_DESC",
//}