aboutsummaryrefslogtreecommitdiff
path: root/anime/anime.structs.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@protonmail.ch>2022-02-23 20:52:09 +0530
committerVidhu Kant Sharma <vidhukant@protonmail.ch>2022-02-23 20:52:09 +0530
commit5e01fb1297e25314184effe2c9f9fbbda0e512fb (patch)
tree0d4d1b1aedd67a3b660dfb26c8ce407c5367898a /anime/anime.structs.go
parent8c685067611d829e5fb8eeaaba48508d15cd4dde (diff)
Pushing barebones manga package
Diffstat (limited to 'anime/anime.structs.go')
-rw-r--r--anime/anime.structs.go48
1 files changed, 14 insertions, 34 deletions
diff --git a/anime/anime.structs.go b/anime/anime.structs.go
index c7b4f00..f5fd273 100644
--- a/anime/anime.structs.go
+++ b/anime/anime.structs.go
@@ -16,37 +16,15 @@
package anime
-type AnimePicture struct {
- Medium string `json:"large"`
- Large string `json:"medium"`
-}
-
-type StatusStatistics struct {
- Watching string `json:"watching"`
- Completed string `json:"completed"`
- OnHold string `json:"on_hold"`
- Dropped string `json:"dropped"`
- PlanToWatch string `json:"plan_to_watch"`
-}
+import (
+ u "github.com/MikunoNaka/MAL2Go/util"
+)
type AnimeStatistics struct {
- Status StatusStatistics `json:"status"`
+ Status u.StatusStatistics `json:"status"`
NumListUsers int `json:"num_list_users"`
}
-type Genre struct {
- Id int `json:"id"`
- Name string `json:"name"`
-}
-
-type ListStatus struct {
- Status string `json:"status"`
- Score int `json:"score"`
- EpWatched int `json:"num_episodes_watched"`
- IsRewatching bool `json:"is_rewatching"`
- UpdatedAt string `json:"updated_at"`
-}
-
type Broadcast struct {
Day string `json:"day_of_the_week"`
Time string `json:"start_time"`
@@ -68,17 +46,19 @@ type Recommendation struct {
Num int `json:"num_recommendations"`
}
-type AltTitles struct {
- Synonyms []string `json:"synonyms"`
- En string `json:"en"`
- Ja string `json:"ja"`
+type ListStatus struct {
+ u.DefaultListStatus
+ EpWatched int `json:"num_watched_episodes"`
+ IsRewatching bool `json:"is_rewatching"`
+ TimesRewatched int `json:"num_times_rewatched"`
+ RewatchValue int `json:"rewatch_value"`
}
type Anime struct {
Id int `json:"id"`
Title string `json:"title"`
- MainPicture AnimePicture `json:"main_picture"`
- AltTitles AltTitles `json:"alternative_titles"`
+ MainPicture u.Picture `json:"main_picture"`
+ AltTitles u.AltTitles `json:"alternative_titles"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Synopsis string `json:"synopsis"`
@@ -96,7 +76,7 @@ type Anime struct {
UpdatedAt string `json:"updated_at"`
MediaType string `json:"media_type"`
Status string `json:"status"`
- Genres []Genre `json:"genres"`
+ Genres []u.Genre `json:"genres"`
MyListStatus ListStatus `json:"my_list_status"`
NumEpisodes int `json:"num_episodes"`
StartSeason Season `json:"start_season"`
@@ -105,7 +85,7 @@ type Anime struct {
DurationSeconds int `json:"average_episode_duration"`
// Rating as in R, PG13, etc
Rating string `json:"rating"`
- Pictures []AnimePicture `json:"pictures"`
+ Pictures []u.Picture `json:"pictures"`
Background string `json:"background"`
RelatedAnime []Related `json:"related_anime"`
Recommendations []Recommendation `json:"recommendations"`