predbnet

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyName    = errors.New("empty search name")
	ErrNothingFound = errors.New("nothing found")
)

Functions

This section is empty.

Types

type Release

type Release struct {
	ID      int    `json:"id"`
	PreTime int64  `json:"pretime"`
	Release string `json:"release"`
	Section string `json:"section"`
	Files   int    `json:"files"`
	//Size    int64  `json:"size"`
	Status int    `json:"status"`
	Reason string `json:"reason"`
	Group  string `json:"group"`
	Genre  string `json:"genre"`
	URL    string `json:"url"`
	NFO    string `json:"nfo"`
	NFOImg string `json:"nfo_img"`
}

Release is the struct for a single pre

func Get

func Get(name string) (Release, error)

Get searches for available pre on predb.net

func GetWithContext

func GetWithContext(ctx context.Context, name string) (Release, error)

GetWithContext retrieves the release information by its name using an HTTP request, utilizing the provided context.

type Releases

type Releases []Release

func (Releases) Get

func (r Releases) Get(name string) (Release, error)

Get searches for a specific pre in the Releases slice

type Result

type Result struct {
	Status  string   `json:"status"`
	Message string   `json:"message"`
	Data    Releases `json:"data"`
	Results int      `json:"results"`
	Page    int      `json:"page"`
	Time    string   `json:"time"`
}

Result is the struct that holds the json decoded result from predb.net.

Jump to

Keyboard shortcuts

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