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: 7 months 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 4 years ago)
- Default Branch: develop
- Last Pushed: 2022-01-03T02:09:26.000Z (almost 4 years ago)
- Last Synced: 2025-01-22T04:21:37.351Z (9 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
[](https://goreportcard.com/report/github.com/mkfsn/nyaa-go)
[](https://github.com/mkfsn/nyaa-go/actions)
[](https://codecov.io/gh/mkfsn/nyaa-go)[](https://pkg.go.dev/github.com/mkfsn/nyaa-go)

[](./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)
}
}
```