From a815c4ea4aa829dedd2cff7f403788896ee0887d Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 23 Feb 2022 22:04:18 +0530 Subject: pushing barebones structs for user/manga --- user/manga/mangalist.structs.go | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 user/manga/mangalist.structs.go (limited to 'user/manga/mangalist.structs.go') diff --git a/user/manga/mangalist.structs.go b/user/manga/mangalist.structs.go new file mode 100644 index 0000000..860163b --- /dev/null +++ b/user/manga/mangalist.structs.go @@ -0,0 +1,44 @@ +/* MAL2Go - MyAnimeList V2 API wrapper for Go + * Copyright (C) 2022 Vidhu Kant Sharma + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +package manga + +import ( + "github.com/MikunoNaka/MAL2Go/util" + "github.com/MikunoNaka/MAL2Go/manga" +) + +type MangaListRaw struct { + Data []struct { + Manga manga.Manga `json:"node"` + ListStatus manga.ListStatus `json:"list_status"` + } `json:"data"` + Paging util.ListPaging `json:"paging"` +} + +type UpdateMangaData struct { + Status string + IsRereading bool + Score int + VolumesRead int + ChaptersRead int + Priority int + TimesReread int + // NOTE: idk what RereadValue is + RereadValue int + Tags string + Comments string +} -- cgit v1.2.3 From 0f321b7c4691923ead42a9b020da98dce1196d07 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 24 Feb 2022 00:43:23 +0530 Subject: modified the endpoints to meet requirements for updating manga --- user/manga/mangalist.structs.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'user/manga/mangalist.structs.go') diff --git a/user/manga/mangalist.structs.go b/user/manga/mangalist.structs.go index 860163b..0ea7d70 100644 --- a/user/manga/mangalist.structs.go +++ b/user/manga/mangalist.structs.go @@ -21,14 +21,21 @@ import ( "github.com/MikunoNaka/MAL2Go/manga" ) +type Manga manga.Manga + type MangaListRaw struct { Data []struct { - Manga manga.Manga `json:"node"` + 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 +} + type UpdateMangaData struct { Status string IsRereading bool -- cgit v1.2.3