aboutsummaryrefslogtreecommitdiff
path: root/content/docs/mal2go/v4/anime/get-anime-by-id.md
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-13 11:54:33 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-13 11:54:33 +0530
commit211888b8a396df8d5166afba85af54e0240015c1 (patch)
tree14edbc114f5cec9da57dd08c9369e3c2f1aaa80c /content/docs/mal2go/v4/anime/get-anime-by-id.md
parent54e1b7496d6a06c92b030114e9d54019ab4ba87f (diff)
removed MAL2Go documentation
Diffstat (limited to 'content/docs/mal2go/v4/anime/get-anime-by-id.md')
-rw-r--r--content/docs/mal2go/v4/anime/get-anime-by-id.md42
1 files changed, 0 insertions, 42 deletions
diff --git a/content/docs/mal2go/v4/anime/get-anime-by-id.md b/content/docs/mal2go/v4/anime/get-anime-by-id.md
deleted file mode 100644
index ca310b3..0000000
--- a/content/docs/mal2go/v4/anime/get-anime-by-id.md
+++ /dev/null
@@ -1,42 +0,0 @@
----
-title: "Getting an anime's information"
-description: "Specify an anime's ID to get all the data about it."
-weight: 3
----
-
-`GetAnimeById` takes in an anime's ID (which can be obtained using [`SearchAnime`](/docs/mal2go/v4/anime/search-for-an-anime) or through the URL of the anime's page on MAL) and returns information about it. This method takes these arguments:
-
-- `id int` The anime's ID
-- `fields []string` The fields to include in the response. [Here](/docs/mal2go/v4/anime/types#mal2goanimeanime) 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/anime"
- "log"
- "fmt"
-)
-
-func main() {
- authToken := "YOUR_TOKEN_HERE"
- myClient := anime.Client {
- AuthToken: "Bearer " + authToken,
- }
-
- id := 457
- fields := []string{"title", "my_list_status", "num_episodes"}
-
- anime, err := myClient.GetAnimeById(id, fields)
- if err != nil {
- log.Fatal(err) // remember kids, always handle errors
- }
-
- fmt.Printf("You have watched %d out of %d episodes in %s. Your list status for %s is %s.\n", anime.MyListStatus.EpWatched, anime.NumEpisodes, anime.Title, anime.Title, anime.MyListStatus.Status)
-}
-```
-
-Above example prints something like
-`"You have watched 26 out of 26 episodes in Mushishi. Your list status for Mushishi is completed."`