nzbget

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const PriorityForce = 900
View Source
const PriorityHigh = 50
View Source
const PriorityLow = -50
View Source
const PriorityNormal = 0
View Source
const PriorityVeryHigh = 100
View Source
const PriorityVeryLow = -100

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendOptions added in v0.4.1

type AppendOptions struct {
	NiceName   string
	Category   string
	Priority   int
	AddToTop   bool
	AddPaused  bool
	DupeKey    string
	DupeScore  int
	DupeMode   string
	Parameters []struct {
		Name  string
		Value string
	}
}

func NewOptions added in v0.4.1

func NewOptions() *AppendOptions

type Client

type Client struct {
	URL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint string) *Client

func (*Client) Add

func (c *Client) Add(URL string, options *AppendOptions) (int64, error)

func (*Client) Delete

func (c *Client) Delete(number int) error

func (*Client) Destroy

func (c *Client) Destroy(number int) error

func (*Client) EditQueue

func (c *Client) EditQueue(command, param string, ids []int) error

func (*Client) Groups

func (c *Client) Groups() ([]Group, error)

func (*Client) History

func (c *Client) History(hidden bool) ([]History, error)

func (*Client) List

func (c *Client) List() (*GroupResponse, error)

func (*Client) Pause

func (c *Client) Pause(number int) error

func (*Client) PauseAll

func (c *Client) PauseAll() error

func (*Client) Remove

func (c *Client) Remove(number int) error

func (*Client) Resume

func (c *Client) Resume(number int) error

func (*Client) ResumeAll

func (c *Client) ResumeAll() error

func (*Client) Status

func (c *Client) Status() (*Status, error)

func (*Client) Version

func (c *Client) Version() (string, error)

type Group

type Group struct {
	ID                 int    `json:"nzbid"` // 4
	RemainingSizeMB    int    // 3497
	PausedSizeMB       int    // 3497
	RemainingFileCount int    // 73
	RemainingParCount  int    // 9
	MinPriority        int    // 0
	MaxPriority        int    // 0
	ActiveDownloads    int    // 0
	Status             string // PAUSED
	NZBName            string // Brave.Are.the.Fallen.2020.1080p.AMZN.WEB-DL.DDP2.0.H.264-ExREN,
	NZBNicename        string // Brave.Are.the.Fallen.2020.1080p.AMZN.WEB-DL.DDP2.0.H.264-ExREN,
	Kind               string // NZB
	URL                string // ,
	NZBFilename        string // Brave.Are.the.Fallen.2020.1080p.AMZN.WEB-DL.DDP2.0.H.264-ExREN,
	DestDir            string // /data/intermediate/Brave.Are.the.Fallen.2020.1080p.AMZN.WEB-DL.DDP2.0.H.264-ExREN.#4,
	FinalDir           string // ,
	Category           string // ,
	ParStatus          string // NONE
	ExParStatus        string // NONE
	UnpackStatus       string // NONE
	MoveStatus         string // NONE
	ScriptStatus       string // NONE
	DeleteStatus       string // NONE
	MarkStatus         string // NONE
	UrlStatus          string // NONE
	FileSizeMB         int    // 3651
	FileCount          int    // 77
	MinPostTime        int    // 1586073677
	MaxPostTime        int    // 1586073793
	TotalArticles      int    // 4992
	SuccessArticles    int    // 212
	FailedArticles     int    // 0
	Health             int    // 1000
	CriticalHealth     int    // 898
	DupeKey            string //
	DupeScore          int    // 0
	DupeMode           string // SCORE
	Deleted            bool
	DownloadedSizeMB   int // 235
	DownloadTimeSec    int // 44
	PostTotalTimeSec   int // 0
	ParTimeSec         int // 0
	RepairTimeSec      int // 0
	UnpackTimeSec      int // 0
	MessageCount       int // 95
	ExtraParBlocks     int // 0
	Parameters         []Parameter
	ScriptStatuses     []ScriptStatus
	ServerStats        []ServerStat
	PostInfoText       string // NONE
	PostStageProgress  int    // 9193728
	PostStageTimeSec   int    // 0
	Log                []Log
}

type GroupResponse

type GroupResponse struct {
	*Response
	Result []Group
}

type History

type History struct {
	ID                 int `json:"nzbid"`
	Name               string
	RemainingFileCount int
	RetryData          bool
	HistoryTime        int
	Status             string
	Log                []string
	NZBName            string
	NZBNicename        string
	Kind               string
	URL                string
	NZBFilename        string
	DestDir            string
	FinalDir           string
	Category           string
	ParStatus          string
	ExParStatus        string
	UnpackStatus       string
	MoveStatus         string
	ScriptStatus       string
	DeleteStatus       string
	MarkStatus         string
	UrlStatus          string
	FileSizeLo         int
	FileSizeHi         int
	FileSizeMB         int
	FileCount          int
	MinPostTime        int
	MaxPostTime        int
	TotalArticles      int
	SuccesArticles     int
	FailedArticles     int
	Health             int
	CriticalHealth     int
	DupeKey            string
	DupeScore          int
	DupeMode           string
	Deleted            bool
	DownloadedSizeLo   int
	DownloadedSizeHi   int
	DownloadedSizeMB   int
	DownloadTimeSec    int
	PostTotalTimeSec   int
	ParTimeSec         int
	RepairTimeSec      int
	UnpackTimeSec      int
	MessageCount       int
	ExtraParBlocks     int
	Parameters         []Parameter
	ScriptStatuses     []ScriptStatus
	ServerStats        []ServerStat
}

type HistoryResponse

type HistoryResponse struct {
	*Response
	Result []History `json:"Result"`
}

type Log

type Log struct {
}

type NewsServer

type NewsServer struct {
	ID     int
	Active bool
}

type Parameter

type Parameter struct {
	Name  string
	Value string
}

type Response

type Response struct {
	APIVersion string `json:"version"`
	Error      string
	Status     *Status
	Timestamp  time.Time
}

type ScriptStatus

type ScriptStatus struct {
	Name   string
	Status string
}

type ServerStat

type ServerStat struct {
	ServerID        int
	SuccessArticles int
	FailedArticles  int
}

type Status

type Status struct {
	RemainingSizeMB     int  // 0
	ForcedSizeMB        int  // 0
	DownloadedSizeMB    int  // 0
	MonthSizeMB         int  // 0
	DaySizeMB           int  // 0
	ArticleCacheMB      int  // 0
	DownloadRate        int  // 0
	AverageDownloadRate int  // 0
	DownloadLimit       int  // 0
	UpTimeSec           int  // 2281
	DownloadTimeSec     int  // 0
	ServerPaused        bool // false
	DownloadPaused      bool // false
	Download2Paused     bool // false
	ServerStandBy       bool // true
	PostPaused          bool // false
	ScanPaused          bool // false
	QuotaReached        bool // false
	FreeDiskSpaceMB     int  // 134539
	ServerTime          int  // 1586063906
	ResumeTime          int  // 0
	FeedActive          bool // false
	QueueScriptCount    int  // 0
	NewsServers         []NewsServer
}

type StatusResponse

type StatusResponse struct {
	*Response
	Result *Status
}

type VersionResponse

type VersionResponse struct {
	*Response
	Version string `json:"result"`
}

Jump to

Keyboard shortcuts

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