diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2022-02-23 16:06:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 16:06:42 +0000 |
commit | 90a9cdb89025930fb7f455b423593a0a35799c4a (patch) | |
tree | 1bbc1d2b57c7eb8a7a36feb51ce0656cf49faf8a /util/structs.go | |
parent | 8c685067611d829e5fb8eeaaba48508d15cd4dde (diff) | |
parent | e21dc47f2fe1dd3b1ad47224cd9cc3e75d0835fb (diff) |
Merge pull request #6 from MikunoNaka/manga
Manga package completed
Diffstat (limited to 'util/structs.go')
-rw-r--r-- | util/structs.go | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/util/structs.go b/util/structs.go index b17f1f7..1483d3f 100644 --- a/util/structs.go +++ b/util/structs.go @@ -19,7 +19,7 @@ package util /* NOTE: MAL still seems to send some fields * even if they aren't requested. * those include Title, Picture, Id, etc */ -// default fields to use when none are specified +// default anime fields to use when none are specified var DefaultFields []string = []string{ "id", "title", "main_picture", "alternative_titles", "start_date", @@ -34,3 +34,62 @@ var DefaultFields []string = []string{ "related_manga", "recommendations", "studios", "statistics", } + +// default manga fields to use when none are specified +var DefaultMangaFields []string = []string{ + "id", "title", "main_picture", + "alternative_titles", "start_date", "end_date", + "synopsis", "mean", "rank", + "popularity", "num_list_users", "num_scoring_users", + "nsfw", "created_at", "media_type", + "status", "genres", "my_list_status", + "num_volumes", "num_chapters", "authors", + "pictures", "background", "related_anime", + "related_manga", "recommendations", "serialization", +} + +// contains previous/next page for anime list +// we don't actually need this. +// TODO: for compatibility's sake, keep this but also define methods +// to get the prev. and next page's elements automatically +type ListPaging struct { + NextPage string `json:"next"` + PrevPage string `json:"previous"` +} + +/* these structs are used + * both by anime and manga package */ +type Picture struct { + Medium string `json:"medium"` + Large string `json:"large"` +} + +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"` +} + +type Genre struct { + Id int `json:"id"` + Name string `json:"name"` +} + +type DefaultListStatus struct { + 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"` +} + +type AltTitles struct { + Synonyms []string `json:"synonyms"` + En string `json:"en"` + Ja string `json:"ja"` +} |