xrel

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 (
	ErrNothingFound = errors.New("nothing found")
)

Functions

This section is empty.

Types

type ExtInfo

type ExtInfo struct {
	Type       string   `json:"type"`
	ID         string   `json:"id"`
	Title      string   `json:"title"`
	LinkHref   string   `json:"link_href"`
	Rating     float64  `json:"rating"`
	NumRatings int      `json:"num_ratings"`
	Uris       []string `json:"uris"`
}

type Release

type Release struct {
	ID         string  `json:"id"`
	Dirname    string  `json:"dirname"`
	LinkHref   string  `json:"link_href"`
	Time       int     `json:"time"`
	GroupName  string  `json:"group_name"`
	Size       Size    `json:"size"`
	VideoType  string  `json:"video_type"`
	AudioType  string  `json:"audio_type"`
	NumRatings int     `json:"num_ratings"`
	ExtInfo    ExtInfo `json:"ext_info"`
	Comments   int     `json:"comments"`
}

func Get

func Get(name string) (Release, error)

Get retrieves release information for the given directory name by making a request to the xrel.to API.

func GetWithContext

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

GetWithContext performs an HTTP GET request to fetch release data by name, using the provided context for cancellation.

type Size

type Size struct {
	Number int    `json:"number"`
	Unit   string `json:"unit"`
}

Jump to

Keyboard shortcuts

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