nyaa

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenTorrentsCh

func GenTorrentsCh(ctx context.Context, torrents []Torrent) <-chan Torrent

Types

type ListInput

type ListInput struct {
	// Domain of nyaa.
	Domain string
	// Category to list.
	Category string
	// Query to search.
	Query string
	// Page to list.
	Page int
	// TrustedOnly is a flag for downloading only trusted user's torrent files.
	TrustedOnly bool
}

ListInput is the input for Nyaa.List().

type Nyaa

type Nyaa interface {
	List(ctx context.Context, input *ListInput) ([]Torrent, error)
}

Nyaa provides APIs for nyaa.

func New

func New() Nyaa

type Torrent

type Torrent struct {
	ID        uint64
	Title     string
	URL       string
	Downloads int
}

Torrent represents a torrent item of nyaa.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL