nyaa-go

Go Report Card
Actions Status
codecov

Go Reference
GitHub go.mod Go version
License

An unofficial nyaa.si client library for Go

Installation

go get github.com/mkfsn/nyaa-go

Example

package main

import (
	"context"
	"fmt"
	"log"

	"github.com/mkfsn/nyaa-go"
)

func main() {
	c := nyaa.NewClient()
	torrents, err := c.Search(context.Background(), nyaa.SearchOptions{
		Provider:  nyaa.ProviderNyaa,
		FilterBy:  nyaa.FilterByNoFilter,
		Category:  nyaa.CategoryAll,
		Query:     "Nana Mizuki - NANA CLIP 8 BDMV",
		SortBy:    nyaa.SortByDate,
		SortOrder: nyaa.SortOrderDesc,
	})
	if err != nil {
		log.Fatalln(err)
	}

	for _, torrent := range torrents {
		fmt.Printf("%+v\n", torrent)
	}
}

GitHub

View Github