diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2022-02-28 05:35:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 05:35:39 +0000 |
commit | 06425ac756f916bca10d0f8797cf575a77dcf69d (patch) | |
tree | 7b4df51906c714f83a2bdce710e218a5cbb6672e /anime | |
parent | f44303ee9de8da4e330116d2c6e6048d59b52526 (diff) | |
parent | 38f7861cc533081aba7458ef52a25acdeddd1f16 (diff) |
Merge pull request #7 from MikunoNaka/user-mangalist
Added functionality to update manga lists
Diffstat (limited to 'anime')
-rw-r--r-- | anime/README.md | 2 | ||||
-rw-r--r-- | anime/anime.structs.go | 22 |
2 files changed, 18 insertions, 6 deletions
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..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"` + 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"` |