added getting MAL watchlist

This commit is contained in:
2024-08-15 21:27:31 -04:00
parent f9c6f4b827
commit 22ff290a81
9 changed files with 252 additions and 22 deletions

View File

@ -1,5 +1,7 @@
package main
import "time"
type MyAnimeListJWT struct {
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
@ -37,3 +39,29 @@ type AnimeStatistics struct {
NumTimesRewatched int `json:"num_times_rewatched" ts_type:"numTimesRewatched"`
MeanScore float64 `json:"mean_score" ts_type:"meanScore"`
}
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"`
}