diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 21:41:22 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 21:41:22 +0530 |
commit | 71210ebc8e04d49a6afeeecee842b2e8b53f3c4f (patch) | |
tree | 87bf595e9095604dbf85cdac4cfd133856833f41 /util/structs.go | |
parent | 052b6604a04ca0909bad714981e3d94c6d9e20b4 (diff) |
handling server errors in user, manga and anime package
Diffstat (limited to 'util/structs.go')
-rw-r--r-- | util/structs.go | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/util/structs.go b/util/structs.go index cb1f052..798b8e0 100644 --- a/util/structs.go +++ b/util/structs.go @@ -48,23 +48,18 @@ var DefaultMangaFields []string = []string{ "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"` +type APIError struct { + Err string `json:"error"` + Msg string `json:"message"` } -/* these structs are used +/* these structs are used * both by anime and manga package */ type Picture struct { Medium string `json:"medium"` Large string `json:"large"` } -// for some reason the API returns them as string type StatusStatistics struct { Watching string `json:"watching"` Completed string `json:"completed"` |