From 0edca3b2faf545abc065de55a94b87a10ac3f405 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 24 Feb 2022 00:39:10 +0530 Subject: renamed MyListStatus to ListStatus --- anime/README.md | 2 +- anime/anime.structs.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'anime') diff --git a/anime/README.md b/anime/README.md index 1040dda..e20f080 100644 --- a/anime/README.md +++ b/anime/README.md @@ -75,7 +75,7 @@ if err != nil { fmt.Println(err) } -fmt.Println(anime.Title, anime.MeanScore, anime.MyListStatus.Status) +fmt.Println(anime.Title, anime.MeanScore, anime.ListStatus.Status) ``` - ### Get anime ranking diff --git a/anime/anime.structs.go b/anime/anime.structs.go index f5fd273..039af12 100644 --- a/anime/anime.structs.go +++ b/anime/anime.structs.go @@ -77,7 +77,7 @@ type Anime struct { MediaType string `json:"media_type"` Status string `json:"status"` Genres []u.Genre `json:"genres"` - MyListStatus ListStatus `json:"my_list_status"` + ListStatus ListStatus `json:"my_list_status"` NumEpisodes int `json:"num_episodes"` StartSeason Season `json:"start_season"` Broadcast Broadcast `json:"broadcast"` -- cgit v1.2.3 From 314d9bf6cad4bebec431a217c23016680c56179b Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 24 Feb 2022 21:40:43 +0530 Subject: moved DefaultListStatus back to each package seperately --- anime/anime.structs.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'anime') diff --git a/anime/anime.structs.go b/anime/anime.structs.go index 039af12..4132989 100644 --- a/anime/anime.structs.go +++ b/anime/anime.structs.go @@ -47,7 +47,16 @@ type Recommendation struct { } type ListStatus struct { - u.DefaultListStatus + Status string `json:"status"` + Score int `json:"score"` + StartDate string `json:"start_date"` + FinishDate string `json:"finish_date"` + Priority int `json:"priority"` + Tags string `json:"tags"` + Comments string `json:"comments"` + UpdatedAt string `json:"updated_at"` + + // these fields are exclusive to anime EpWatched int `json:"num_watched_episodes"` IsRewatching bool `json:"is_rewatching"` TimesRewatched int `json:"num_times_rewatched"` @@ -68,16 +77,19 @@ type Anime struct { NumListUsers int `json:"num_list_users"` NumScoringUsers int `json:"num_scoring_users"` /* NsfwStatus potential values: - * white = sfw - * gray = probably nsfw - * black = nsfw */ + * white = sfw + * gray = probably nsfw + * black = nsfw */ NsfwStatus string `json:"nsfw"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` MediaType string `json:"media_type"` Status string `json:"status"` - Genres []u.Genre `json:"genres"` - ListStatus ListStatus `json:"my_list_status"` + Genres []u.Genre `json:"genres"` + /* MyListStatus refers to the authenticated user's info + * while ListStatus can be used for other users */ + MyListStatus ListStatus `json:"my_list_status"` + ListStatus ListStatus `json:"list_status"` NumEpisodes int `json:"num_episodes"` StartSeason Season `json:"start_season"` Broadcast Broadcast `json:"broadcast"` -- cgit v1.2.3