Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Latest commit

 

History

History
39 lines (28 loc) · 1.06 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.06 KB

shikimori

PkgGoDev codecov release license

Status - https://github.com/SevereCloud/shikimori/milestone/1

package main

import (
	"context"
	"log"

	"github.com/SevereCloud/shikimori"
)

func main() {
	shiki := shikimori.NewAPI()

	// shiki.UserAgent = "MyUserAgent"
	// shiki.AccessToken = os.Getenv("ACCESS_TOKEN")

	ctx := context.Background()

	resp, err := shiki.UsersAnimeRates(ctx, "SevereCloud", &shikimori.UsersAnimeRateParams{
		Limit:  1,
		Status: shikimori.Watching,
	})
	if err != nil {
		log.Fatal(err)
	}

	log.Println(resp[0].Anime.Name)
}