Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkfsn/nyaa-go
An unofficial nyaa.si client library for Go
https://github.com/mkfsn/nyaa-go
nyaa nyaa-si
Last synced: about 1 month ago
JSON representation
An unofficial nyaa.si client library for Go
- Host: GitHub
- URL: https://github.com/mkfsn/nyaa-go
- Owner: mkfsn
- License: mit
- Created: 2022-01-01T17:14:19.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2022-01-03T02:09:26.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T03:18:37.417Z (6 months ago)
- Topics: nyaa, nyaa-si
- Language: Go
- Homepage: https://nyaa.si
- Size: 68.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# nyaa-go
[![Go Report Card](https://goreportcard.com/badge/github.com/mkfsn/nyaa-go)](https://goreportcard.com/report/github.com/mkfsn/nyaa-go)
[![Actions Status](https://github.com/mkfsn/nyaa-go/actions/workflows/develop.yaml/badge.svg)](https://github.com/mkfsn/nyaa-go/actions)
[![codecov](https://codecov.io/gh/mkfsn/nyaa-go/branch/develop/graph/badge.svg?token=Z3IKJYGSJV)](https://codecov.io/gh/mkfsn/nyaa-go)[![Go Reference](https://pkg.go.dev/badge/github.com/mkfsn/nyaa-go.svg)](https://pkg.go.dev/github.com/mkfsn/nyaa-go)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/mkfsn/nyaa-go)
[![License](https://img.shields.io/github/license/mkfsn/notion-go.svg)](./LICENSE.md)An unofficial nyaa.si client library for Go
## Installation
```bash
go get github.com/mkfsn/nyaa-go
```## Example
```go
package mainimport (
"context"
"fmt"
"log""github.com/mkfsn/nyaa-go"
)func main() {
c := nyaa.NewClient()
torrents, pageInfo, 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,
// Page: nyaa.Page(0),
})
if err != nil {
log.Fatalln(err)
}
fmt.Printf("pageInfo: %#v\n", pageInfo)for _, torrent := range torrents {
fmt.Printf("%+v\n", torrent)
}
}
```