A Go client for the MangaDex API v2.
$ go get github.com/bake/mangadex/v2
func main() {
md := mangadex.New()
ctx := context.TODO()
m, err := md.Manga(ctx, 23279, nil)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s by %s", m, m.Author[0])
// Output: Wonder Cat Kyuu-chan by Nitori Sasami
}
func main() {
md := mangadex.New()
ctx := context.TODO()
c, err := md.Chapter(ctx, 517244, nil)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s (Volume %s, Chapter %s)", c, c.Volume, c.Chapter)
// Output: Cool Day (Volume 3, Chapter 253)
}