prowlarr

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const APIver = "v1"

APIver is the Prowlarr API version supported by this library.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities added in v1.0.0

type Capabilities struct {
	SupportsRawSearch bool          `json:"supportsRawSearch"`
	LimitsMax         int64         `json:"limitsMax"`
	LimitsDefault     int64         `json:"limitsDefault"`
	SearchParams      []string      `json:"searchParams"`
	TvSearchParams    []string      `json:"tvSearchParams"`
	MovieSearchParams []string      `json:"movieSearchParams"`
	MusicSearchParams []string      `json:"musicSearchParams"`
	BookSearchParams  []string      `json:"bookSearchParams"`
	Categories        []*Categories `json:"categories"`
}

Capabilities is part of IndexerOutput.

type Categories added in v1.0.0

type Categories struct {
	ID            int64         `json:"id"`
	Name          string        `json:"name"`
	SubCategories []*Categories `json:"subCategories"`
}

Categories is part of Capabilities.

type DownloadClientInput added in v1.0.0

type DownloadClientInput struct {
	Enable         bool                `json:"enable"`
	Priority       int                 `json:"priority"`
	ID             int64               `json:"id,omitempty"`
	ConfigContract string              `json:"configContract"`
	Implementation string              `json:"implementation"`
	Name           string              `json:"name"`
	Protocol       string              `json:"protocol"`
	Tags           []int               `json:"tags"`
	Fields         []*starr.FieldInput `json:"fields"`
}

DownloadClientInput is the input for a new or updated download client.

type DownloadClientOutput added in v1.0.0

type DownloadClientOutput struct {
	Enable             bool                 `json:"enable"`
	Priority           int                  `json:"priority"`
	ID                 int64                `json:"id,omitempty"`
	ConfigContract     string               `json:"configContract"`
	Implementation     string               `json:"implementation"`
	ImplementationName string               `json:"implementationName"`
	InfoLink           string               `json:"infoLink"`
	Name               string               `json:"name"`
	Protocol           string               `json:"protocol"`
	Tags               []int                `json:"tags"`
	Fields             []*starr.FieldOutput `json:"fields"`
}

DownloadClientOutput is the output from the download client methods.

type IndexerInput added in v1.0.0

type IndexerInput struct {
	Enable         bool                `json:"enable"`
	Redirect       bool                `json:"redirect"`
	Priority       int64               `json:"priority"`
	ID             int64               `json:"id,omitempty"`
	AppProfileID   int64               `json:"appProfileId"`
	ConfigContract string              `json:"configContract"`
	Implementation string              `json:"implementation"`
	Name           string              `json:"name"`
	Protocol       string              `json:"protocol"`
	Tags           []int               `json:"tags,omitempty"`
	Fields         []*starr.FieldInput `json:"fields"`
}

IndexerInput is the input for a new or updated indexer.

type IndexerOutput added in v1.0.0

type IndexerOutput struct {
	Enable             bool                 `json:"enable"`
	Redirect           bool                 `json:"redirect"`
	SupportsRss        bool                 `json:"supportsRss"`
	SupportsSearch     bool                 `json:"supportsSearch"`
	SupportsRedirect   bool                 `json:"supportsRedirect"`
	AppProfileID       int64                `json:"appProfileId"`
	ID                 int64                `json:"id,omitempty"`
	Priority           int64                `json:"priority"`
	SortName           string               `json:"sortName"`
	Name               string               `json:"name"`
	Protocol           string               `json:"protocol"`
	Privacy            string               `json:"privacy"`
	DefinitionName     string               `json:"definitionName"`
	Description        string               `json:"description"`
	Language           string               `json:"language"`
	Encoding           string               `json:"encoding,omitempty"`
	ImplementationName string               `json:"implementationName"`
	Implementation     string               `json:"implementation"`
	ConfigContract     string               `json:"configContract"`
	InfoLink           string               `json:"infoLink"`
	Added              time.Time            `json:"added"`
	Capabilities       *Capabilities        `json:"capabilities,omitempty"`
	Tags               []int                `json:"tags"`
	IndexerUrls        []string             `json:"indexerUrls"`
	LegacyUrls         []string             `json:"legacyUrls"`
	Fields             []*starr.FieldOutput `json:"fields"`
}

IndexerOutput is the output from the indexer methods.

type NotificationInput added in v1.0.0

type NotificationInput struct {
	OnGrab                      bool                `json:"onGrab"`
	OnHealthIssue               bool                `json:"onHealthIssue"`
	OnHealthRestored            bool                `json:"onHealthRestored"`
	OnApplicationUpdate         bool                `json:"onApplicationUpdate"`
	SupportsOnGrab              bool                `json:"supportsOnGrab"`
	IncludeManualGrabs          bool                `json:"includeManualGrabs"`
	SupportsOnHealthIssue       bool                `json:"supportsOnHealthIssue"`
	SupportsOnHealthRestored    bool                `json:"supportsOnHealthRestored"`
	IncludeHealthWarnings       bool                `json:"includeHealthWarnings"`
	SupportsOnApplicationUpdate bool                `json:"supportsOnApplicationUpdate"`
	ID                          int64               `json:"id,omitempty"` // update only
	Name                        string              `json:"name"`
	ImplementationName          string              `json:"implementationName"`
	Implementation              string              `json:"implementation"`
	ConfigContract              string              `json:"configContract"`
	InfoLink                    string              `json:"infoLink"`
	Tags                        []int               `json:"tags"`
	Fields                      []*starr.FieldInput `json:"fields"`
}

NotificationInput is the input for a new or updated notification.

type NotificationOutput added in v1.0.0

type NotificationOutput struct {
	OnGrab                      bool                 `json:"onGrab"`
	OnHealthIssue               bool                 `json:"onHealthIssue"`
	OnHealthRestored            bool                 `json:"onHealthRestored"`
	OnApplicationUpdate         bool                 `json:"onApplicationUpdate"`
	SupportsOnGrab              bool                 `json:"supportsOnGrab"`
	IncludeManualGrabs          bool                 `json:"includeManualGrabs"`
	SupportsOnHealthIssue       bool                 `json:"supportsOnHealthIssue"`
	SupportsOnHealthRestored    bool                 `json:"supportsOnHealthRestored"`
	IncludeHealthWarnings       bool                 `json:"includeHealthWarnings"`
	SupportsOnApplicationUpdate bool                 `json:"supportsOnApplicationUpdate"`
	ID                          int64                `json:"id"`
	Name                        string               `json:"name"`
	ImplementationName          string               `json:"implementationName"`
	Implementation              string               `json:"implementation"`
	ConfigContract              string               `json:"configContract"`
	InfoLink                    string               `json:"infoLink"`
	Tags                        []int                `json:"tags"`
	Fields                      []*starr.FieldOutput `json:"fields"`
	Message                     struct {
		Message string `json:"message"` // this is a weird place for a message
		Type    string `json:"type"`
	} `json:"message"`
}

NotificationOutput is the output from the notification methods.

type Prowlarr

type Prowlarr struct {
	starr.APIer
}

Prowlarr contains all the methods to interact with a Prowlarr server.

func New

func New(config *starr.Config) *Prowlarr

New returns a Prowlarr object used to interact with the Prowlarr API.

func (*Prowlarr) AddDownloadClient added in v1.0.0

func (p *Prowlarr) AddDownloadClient(downloadclient *DownloadClientInput) (*DownloadClientOutput, error)

AddDownloadClient creates a download client.

func (*Prowlarr) AddDownloadClientContext added in v1.0.0

func (p *Prowlarr) AddDownloadClientContext(ctx context.Context,
	client *DownloadClientInput,
) (*DownloadClientOutput, error)

AddDownloadClientContext creates a download client.

func (*Prowlarr) AddIndexer added in v1.0.0

func (p *Prowlarr) AddIndexer(indexer *IndexerInput) (*IndexerOutput, error)

AddIndexer creates a indexer.

func (*Prowlarr) AddIndexerContext added in v1.0.0

func (p *Prowlarr) AddIndexerContext(ctx context.Context, indexer *IndexerInput) (*IndexerOutput, error)

AddIndexerContext creates a indexer.

func (*Prowlarr) AddNotification added in v1.0.0

func (p *Prowlarr) AddNotification(notification *NotificationInput) (*NotificationOutput, error)

AddNotification creates a notification.

func (*Prowlarr) AddNotificationContext added in v1.0.0

func (p *Prowlarr) AddNotificationContext(ctx context.Context, client *NotificationInput) (*NotificationOutput, error)

AddNotificationContext creates a notification.

func (*Prowlarr) AddTag added in v0.14.0

func (p *Prowlarr) AddTag(tag *starr.Tag) (*starr.Tag, error)

AddTag creates a tag.

func (*Prowlarr) AddTagContext added in v0.14.0

func (p *Prowlarr) AddTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)

AddTagContext creates a tag.

func (*Prowlarr) DeleteDownloadClient added in v1.0.0

func (p *Prowlarr) DeleteDownloadClient(downloadclientID int64) error

DeleteDownloadClient removes a single download client.

func (*Prowlarr) DeleteDownloadClientContext added in v1.0.0

func (p *Prowlarr) DeleteDownloadClientContext(ctx context.Context, downloadclientID int64) error

DeleteDownloadClientContext removes a single download client.

func (*Prowlarr) DeleteIndexer added in v1.0.0

func (p *Prowlarr) DeleteIndexer(indexerID int64) error

DeleteIndexer removes a single indexer.

func (*Prowlarr) DeleteIndexerContext added in v1.0.0

func (p *Prowlarr) DeleteIndexerContext(ctx context.Context, indexerID int64) error

DeleteIndexerContext removes a single indexer.

func (*Prowlarr) DeleteNotification added in v1.0.0

func (p *Prowlarr) DeleteNotification(notificationID int64) error

DeleteNotification removes a single notification.

func (*Prowlarr) DeleteNotificationContext added in v1.0.0

func (p *Prowlarr) DeleteNotificationContext(ctx context.Context, notificationID int64) error

func (*Prowlarr) DeleteTag added in v0.14.0

func (p *Prowlarr) DeleteTag(tagID int) error

DeleteTag removes a single tag.

func (*Prowlarr) DeleteTagContext added in v0.14.0

func (p *Prowlarr) DeleteTagContext(ctx context.Context, tagID int) error

func (*Prowlarr) GetBackupFiles

func (p *Prowlarr) GetBackupFiles() ([]*starr.BackupFile, error)

GetBackupFiles returns all available Prowlarr backup files. Use GetBody to download a file using BackupFile.Path.

func (*Prowlarr) GetBackupFilesContext added in v0.13.0

func (p *Prowlarr) GetBackupFilesContext(ctx context.Context) ([]*starr.BackupFile, error)

GetBackupFiles returns all available Prowlarr backup files. Use GetBody to download a file using BackupFile.Path.

func (*Prowlarr) GetDownloadClient added in v1.0.0

func (p *Prowlarr) GetDownloadClient(downloadclientID int64) (*DownloadClientOutput, error)

GetDownloadClient returns a single download client.

func (*Prowlarr) GetDownloadClientContext added in v1.0.0

func (p *Prowlarr) GetDownloadClientContext(ctx context.Context, clientID int64) (*DownloadClientOutput, error)

GetDownloadClientContext returns a single download client.

func (*Prowlarr) GetDownloadClients added in v1.0.0

func (p *Prowlarr) GetDownloadClients() ([]*DownloadClientOutput, error)

GetDownloadClients returns all configured download clients.

func (*Prowlarr) GetDownloadClientsContext added in v1.0.0

func (p *Prowlarr) GetDownloadClientsContext(ctx context.Context) ([]*DownloadClientOutput, error)

GetDownloadClientsContext returns all configured download clients.

func (*Prowlarr) GetIndexer added in v1.0.0

func (p *Prowlarr) GetIndexer(indexerID int64) (*IndexerOutput, error)

GetIndexer returns a single indexer.

func (*Prowlarr) GetIndexerContext added in v1.0.0

func (p *Prowlarr) GetIndexerContext(ctx context.Context, indexerID int64) (*IndexerOutput, error)

GetIndGetIndexerContextexer returns a single indexer.

func (*Prowlarr) GetIndexers added in v1.0.0

func (p *Prowlarr) GetIndexers() ([]*IndexerOutput, error)

GetIndexers returns all configured indexers.

func (*Prowlarr) GetIndexersContext added in v1.0.0

func (p *Prowlarr) GetIndexersContext(ctx context.Context) ([]*IndexerOutput, error)

GetIndexersContext returns all configured indexers.

func (*Prowlarr) GetNotification added in v1.0.0

func (p *Prowlarr) GetNotification(notificationID int) (*NotificationOutput, error)

GetNotification returns a single notification.

func (*Prowlarr) GetNotificationContext added in v1.0.0

func (p *Prowlarr) GetNotificationContext(ctx context.Context, notificationID int) (*NotificationOutput, error)

GetNotificationContext returns a single notification.

func (*Prowlarr) GetNotifications added in v1.0.0

func (p *Prowlarr) GetNotifications() ([]*NotificationOutput, error)

GetNotifications returns all configured notifications.

func (*Prowlarr) GetNotificationsContext added in v1.0.0

func (p *Prowlarr) GetNotificationsContext(ctx context.Context) ([]*NotificationOutput, error)

GetNotificationsContext returns all configured notifications.

func (*Prowlarr) GetSystemStatus added in v0.13.0

func (p *Prowlarr) GetSystemStatus() (*SystemStatus, error)

GetSystemStatus returns system status.

func (*Prowlarr) GetSystemStatusContext added in v0.13.0

func (p *Prowlarr) GetSystemStatusContext(ctx context.Context) (*SystemStatus, error)

GetSystemStatusContext returns system status.

func (*Prowlarr) GetTag added in v0.14.0

func (p *Prowlarr) GetTag(tagID int) (*starr.Tag, error)

GetTag returns a single tag.

func (*Prowlarr) GetTagContext added in v0.14.0

func (p *Prowlarr) GetTagContext(ctx context.Context, tagID int) (*starr.Tag, error)

GetTagContext returns a single tag.

func (*Prowlarr) GetTags added in v0.14.0

func (p *Prowlarr) GetTags() ([]*starr.Tag, error)

GetTags returns all configured tags.

func (*Prowlarr) GetTagsContext added in v0.14.0

func (p *Prowlarr) GetTagsContext(ctx context.Context) ([]*starr.Tag, error)

GetTagsContext returns all configured tags.

func (*Prowlarr) TestDownloadClient added in v1.0.0

func (p *Prowlarr) TestDownloadClient(client *DownloadClientInput) error

TestDownloadClient tests a download client.

func (*Prowlarr) TestDownloadClientContext added in v1.0.0

func (p *Prowlarr) TestDownloadClientContext(ctx context.Context, client *DownloadClientInput) error

TestDownloadClientContext tests a download client.

func (*Prowlarr) TestIndexer added in v1.0.0

func (p *Prowlarr) TestIndexer(indexer *IndexerInput) error

TestIndexer tests an indexer.

func (*Prowlarr) TestIndexerContext added in v1.0.0

func (p *Prowlarr) TestIndexerContext(ctx context.Context, indexer *IndexerInput) error

TestIndexerContext tests an indexer.

func (*Prowlarr) UpdateDownloadClient added in v1.0.0

func (p *Prowlarr) UpdateDownloadClient(client *DownloadClientInput, force bool) (*DownloadClientOutput, error)

UpdateDownloadClient updates the download client.

func (*Prowlarr) UpdateDownloadClientContext added in v1.0.0

func (p *Prowlarr) UpdateDownloadClientContext(ctx context.Context,
	client *DownloadClientInput,
	force bool,
) (*DownloadClientOutput, error)

UpdateDownloadClientContext updates the download client.

func (*Prowlarr) UpdateIndexer added in v1.0.0

func (p *Prowlarr) UpdateIndexer(indexer *IndexerInput, force bool) (*IndexerOutput, error)

UpdateIndexer updates the indexer.

func (*Prowlarr) UpdateIndexerContext added in v1.0.0

func (p *Prowlarr) UpdateIndexerContext(
	ctx context.Context,
	indexer *IndexerInput,
	force bool,
) (*IndexerOutput, error)

UpdateIndexerContext updates the indexer.

func (*Prowlarr) UpdateNotification added in v1.0.0

func (p *Prowlarr) UpdateNotification(notification *NotificationInput) (*NotificationOutput, error)

UpdateNotification updates the notification.

func (*Prowlarr) UpdateNotificationContext added in v1.0.0

func (p *Prowlarr) UpdateNotificationContext(ctx context.Context,
	client *NotificationInput,
) (*NotificationOutput, error)

UpdateNotificationContext updates the notification.

func (*Prowlarr) UpdateTag added in v0.14.0

func (p *Prowlarr) UpdateTag(tag *starr.Tag) (*starr.Tag, error)

UpdateTag updates a tag.

func (*Prowlarr) UpdateTagContext added in v0.14.0

func (p *Prowlarr) UpdateTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)

UpdateTagContext updates a tag.

type SystemStatus added in v0.13.0

type SystemStatus struct {
	AppData                string    `json:"appData"`
	AppName                string    `json:"appName"`
	Authentication         string    `json:"authentication"`
	Branch                 string    `json:"branch"`
	BuildTime              time.Time `json:"buildTime"`
	DatabaseType           string    `json:"databaseType"`
	DatabaseVersion        string    `json:"databaseVersion"`
	InstanceName           string    `json:"instanceName"`
	IsAdmin                bool      `json:"isAdmin"`
	IsDebug                bool      `json:"isDebug"`
	IsDocker               bool      `json:"isDocker"`
	IsLinux                bool      `json:"isLinux"`
	IsMono                 bool      `json:"isMono"`
	IsNetCore              bool      `json:"isNetCore"`
	IsOsx                  bool      `json:"isOsx"`
	IsProduction           bool      `json:"isProduction"`
	IsUserInteractive      bool      `json:"isUserInteractive"`
	IsWindows              bool      `json:"isWindows"`
	MigrationVersion       int64     `json:"migrationVersion"`
	Mode                   string    `json:"mode"`
	OsName                 string    `json:"osName"`
	OsVersion              string    `json:"osVersion"`
	PackageAuthor          string    `json:"packageAuthor"`
	PackageUpdateMechanism string    `json:"packageUpdateMechanism"`
	PackageVersion         string    `json:"packageVersion"`
	RuntimeName            string    `json:"runtimeName"`
	RuntimeVersion         string    `json:"runtimeVersion"`
	StartTime              time.Time `json:"startTime"`
	StartupPath            string    `json:"startupPath"`
	URLBase                string    `json:"urlBase"`
	Version                string    `json:"version"`
}

SystemStatus is the /api/v1/system/status endpoint.

Jump to

Keyboard shortcuts

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