From 05fe09f3ec167417ea94fc04148ac110f18c4ad6 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 16 Jun 2022 22:20:17 +0530 Subject: added api error handling to user/anime and user/manga packages --- user/manga/mangalist.structs.go | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'user/manga/mangalist.structs.go') diff --git a/user/manga/mangalist.structs.go b/user/manga/mangalist.structs.go index 0ea7d70..d7e5352 100644 --- a/user/manga/mangalist.structs.go +++ b/user/manga/mangalist.structs.go @@ -17,23 +17,18 @@ package manga import ( - "github.com/MikunoNaka/MAL2Go/util" "github.com/MikunoNaka/MAL2Go/manga" ) -type Manga manga.Manga - -type MangaListRaw struct { +type mangaListRaw struct { Data []struct { - Manga Manga `json:"node"` + Manga manga.Manga `json:"node"` ListStatus manga.ListStatus `json:"list_status"` - } `json:"data"` - Paging util.ListPaging `json:"paging"` -} - -type MangaList struct { - Mangas []Manga - Paging util.ListPaging + } `json:"data"` + Paging struct { + NextPage string `json:"next"` + PrevPage string `json:"previous"` + } `json:"paging"` } type UpdateMangaData struct { @@ -44,7 +39,6 @@ type UpdateMangaData struct { ChaptersRead int Priority int TimesReread int - // NOTE: idk what RereadValue is RereadValue int Tags string Comments string -- cgit v1.2.3