From 412cf2df2ef3dd416e7fad75c4ae7e264acdaf5b Mon Sep 17 00:00:00 2001 From: daru Date: Sat, 16 Apr 2022 12:09:08 +0200 Subject: [PATCH] AnimeDetail --- klotz.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/klotz.go b/klotz.go index 58a45e6..ba5166f 100644 --- a/klotz.go +++ b/klotz.go @@ -4,9 +4,50 @@ import "time" type Anime struct { Anime int64 `json:"anime"` + Data AnimeDetail `json:"data"` Users []WatchUser `json:"users"` } +type AnimeDetail struct { + Title string `json:"title"` + TitleEn string `json:"title_en"` + TitleJp string `json:"title_jp"` + Image struct { + ImageURL string `json:"medium"` + LargeURL string `json:"large"` + ThumbURL string `json:"thumb"` + } `json:"image"` + Type string `json:"type"` + Status string `json:"status"` + Episodes int `json:"episodes"` + Synopsis string `json:"synopsis"` + Genres []struct { + ID int `json:"id"` + Name string `json:"name"` + } `json:"genres"` + StartDate time.Time `json:"start_date"` + EndDate time.Time `json:"end_date"` + Season struct { + Year int `json:"year"` + Season string `json:"season"` + } `json:"season"` + Score float64 `json:"score"` + ScoredBy int `json:"scored_by"` + Rank int `json:"rank"` + Popularity int `json:"popularity"` + Members int `json:"members"` + Source string `json:"source"` + Broadcast struct { + DayOfTheWeek string `json:"day_of_the_week"` + StartTime string `json:"start_time"` + } `json:"broadcast"` + Studios []struct { + ID int `json:"id"` + Name string `json:"name"` + } `json:"studios"` + TrailerURL string `json:"trailer_url"` +} + type WatchUser struct { Username string `json:"username"` MalID int64 `json:"malId"` @@ -39,6 +80,7 @@ type AnimeDetailMal struct { Ja string `json:"ja"` } `json:"alternative_titles"` StartDate string `json:"start_date"` + EndDate string `json:"end_date"` Synopsis string `json:"synopsis"` Mean float64 `json:"mean"` Rank int `json:"rank"`