From 211888b8a396df8d5166afba85af54e0240015c1 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 13 Aug 2023 11:54:33 +0530 Subject: removed MAL2Go documentation --- content/docs/mal2go/v4/manga/get-manga-by-id.md | 44 ------------------------- 1 file changed, 44 deletions(-) delete mode 100644 content/docs/mal2go/v4/manga/get-manga-by-id.md (limited to 'content/docs/mal2go/v4/manga/get-manga-by-id.md') diff --git a/content/docs/mal2go/v4/manga/get-manga-by-id.md b/content/docs/mal2go/v4/manga/get-manga-by-id.md deleted file mode 100644 index b138785..0000000 --- a/content/docs/mal2go/v4/manga/get-manga-by-id.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "Getting a manga's information" -description: "Specify a manga's ID to get all the data about it." -weight: 3 ---- - -`GetMangaById` takes in a manga's ID (which can be obtained using [`SearchManga`](/docs/mal2go/v4/manga/search-for-a-manga) or through the URL of the manga's page on MAL) and returns information about it. This method takes these arguments: - -- `id int` The manga's ID -- `fields []string` The fields to include in the response. [Here]() is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. - -Example: - -``` go -package main - -import ( - "github.com/MikunoNaka/MAL2Go/v4/manga" - "log" - "fmt" -) - -func main() { - authToken := "YOUR_TOKEN_HERE" - myClient := manga.Client { - AuthToken: "Bearer " + authToken, - } - - id := 103890 - fields := []string{"title", "my_list_status", "num_chapters"} - - manga, err := myClient.GetMangaById(id, fields) - if err != nil { - log.Fatal(err) // remember kids, always handle errors - } - - fmt.Printf("You have read %d out of %d chapters in %s. Your list status for %s is %s.\n", manga.MyListStatus.ChaptersRead, manga.NumChapters, manga.Title, manga.Title, manga.MyListStatus.Status) -} -``` - -Above example prints something like -`"You have read 7 out of 187 chapters in Bokutachi wa Benkyou ga Dekinai. Your list status for Bokutachi wa Benkyou ga Dekinai is reading."` - -Above output shows blank status because mushishi is not in my list. This is expected. -- cgit v1.2.3