anitrack/MALTypes.go

68 lines
3.1 KiB
Go
Raw Normal View History

2024-08-13 18:54:27 -04:00
package main
2024-08-15 21:27:31 -04:00
import "time"
2024-08-13 18:54:27 -04:00
type MyAnimeListJWT struct {
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
}
type MyAnimeListUser struct {
Id int32 `json:"id" ts_type:"id"`
Name string `json:"name" ts_type:"name"`
Picture string `json:"picture" ts_type:"picture"`
Gender string `json:"gender" ts_type:"gender"`
Birthday string `json:"birthday" ts_type:"birthday"`
Location string `json:"location" ts_type:"location"`
JoinedAt string `json:"joined_at" ts_type:"joinedAt"`
AnimeStatistics `json:"anime_statistics" ts_type:"AnimeStatistics"`
TimeZone string `json:"time_zone" ts_type:"timeZone"`
IsSupporter bool `json:"is_supporter" ts_type:"isSupporter"`
}
type AnimeStatistics struct {
NumItemsWatching int `json:"num_items_watching" ts_type:"numItemsWatching"`
NumItemsCompleted int `json:"num_items_completed" ts_type:"numItemsCompleted"`
NumItemsOnHold int `json:"num_items_on_hold" ts_type:"numItemsOnHold"`
NumItemsDropped int `json:"num_items_dropped" ts_type:"numItemsDropped"`
NumItemsPlanToWatch int `json:"num_items_plan_to_watch" ts_type:"numItemsPlanToWatch"`
NumItems int `json:"num_items" ts_type:"numItems"`
NumDaysWatched float64 `json:"num_days_watched" ts_type:"numDaysWatched"`
NumDaysWatching float64 `json:"num_days_watching" ts_type:"numDaysWatching"`
NumDaysCompleted float64 `json:"num_days_completed" ts_type:"numDaysCompleted"`
NumDaysOnHold float64 `json:"num_days_on_hold" ts_type:"numDaysOnHold"`
NumDaysDropped float64 `json:"num_days_dropped" ts_type:"numDaysDropped"`
NumDays float64 `json:"num_days" ts_type:"numDays"`
NumEpisodes int `json:"num_episodes" ts_type:"numEpisodes"`
NumTimesRewatched int `json:"num_times_rewatched" ts_type:"numTimesRewatched"`
MeanScore float64 `json:"mean_score" ts_type:"meanScore"`
}
2024-08-15 21:27:31 -04:00
type MALWatchlist struct {
Data []struct {
Node struct {
Id int `json:"id" ts_type:"id"`
Title string `json:"title" ts_type:"title"`
MainPicture struct {
Medium string `json:"medium" json:"medium"`
Large string `json:"large" json:"large"`
} `json:"main_picture" json:"mainPicture"`
} `json:"node" json:"node"`
ListStatus struct {
Status string `json:"status" ts_type:"status"`
Score int `json:"score" ts_type:"score"`
NumEpisodesWatched int `json:"num_episodes_watched" ts_type:"numEpisodesWatched"`
IsRewatching bool `json:"is_rewatching" ts_type:"isRewatching"`
UpdatedAt time.Time `json:"updated_at" ts_type:"updatedAt"`
StartDate string `json:"start_date" ts_type:"startDate"`
FinishDate string `json:"finish_date" ts_type:"finishDate"`
} `json:"list_status" ts_type:"listStatus"`
} `json:"data" json:"data"`
Paging struct {
Previous string `json:"previous" ts_type:"previous"`
Next string `json:"next" ts_type:"next"`
} `json:"paging" ts_type:"paging"`
}