Documentation
¶
Overview ¶
Package prowlarr provides a client for the Prowlarr v1 API.
Prowlarr is an indexer manager and proxy that integrates with various PVR applications. It manages all indexer configuration in a single place and pushes them to connected applications like Sonarr, Radarr, Lidarr, and Readarr.
The Client type wraps arr.BaseClient and exposes typed methods for every major Prowlarr resource: indexers, applications, app profiles, search, history, statistics, tags, commands, and more.
Example ¶
package main
import (
"context"
"fmt"
"log"
"github.com/lusoris/goenvoy/arr/prowlarr"
)
func main() {
// Create a new Prowlarr client
client, err := prowlarr.New("http://localhost:9696", "your-api-key")
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
// Get system status
status, err := client.GetSystemStatus(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s version %s\n", status.AppName, status.Version)
// Get all indexers
indexers, err := client.GetIndexers(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Total indexers: %d\n", len(indexers))
}
Output:
Index ¶
- type AppProfile
- type Application
- type ApplicationBulkResource
- type Client
- func (c *Client) AddAppProfile(ctx context.Context, profile *AppProfile) (*AppProfile, error)
- func (c *Client) AddApplication(ctx context.Context, app *Application) (*Application, error)
- func (c *Client) AddIndexer(ctx context.Context, indexer *Indexer) (*Indexer, error)
- func (c *Client) ApplicationAction(ctx context.Context, name string, body *Application) error
- func (c *Client) BrowseFileSystem(ctx context.Context, path string) (map[string]any, error)
- func (c *Client) BulkDeleteApplications(ctx context.Context, ids []int) error
- func (c *Client) BulkDeleteDownloadClients(ctx context.Context, ids []int) error
- func (c *Client) BulkDeleteIndexers(ctx context.Context, ids []int) error
- func (c *Client) BulkUpdateApplications(ctx context.Context, bulk *ApplicationBulkResource) ([]Application, error)
- func (c *Client) BulkUpdateDownloadClients(ctx context.Context, bulk *arr.ProviderBulkResource) ([]DownloadClientResource, error)
- func (c *Client) BulkUpdateIndexers(ctx context.Context, bulk *IndexerBulkResource) ([]Indexer, error)
- func (c *Client) CreateCustomFilter(ctx context.Context, filter *arr.CustomFilterResource) (*arr.CustomFilterResource, error)
- func (c *Client) CreateDownloadClient(ctx context.Context, dc *DownloadClientResource) (*DownloadClientResource, error)
- func (c *Client) CreateIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) (*IndexerProxyResource, error)
- func (c *Client) CreateNotification(ctx context.Context, n *arr.ProviderResource) (*arr.ProviderResource, error)
- func (c *Client) CreateTag(ctx context.Context, label string) (*arr.Tag, error)
- func (c *Client) DeleteAppProfile(ctx context.Context, id int) error
- func (c *Client) DeleteApplication(ctx context.Context, id int) error
- func (c *Client) DeleteBackup(ctx context.Context, id int) error
- func (c *Client) DeleteCommand(ctx context.Context, id int) error
- func (c *Client) DeleteCustomFilter(ctx context.Context, id int) error
- func (c *Client) DeleteDownloadClient(ctx context.Context, id int) error
- func (c *Client) DeleteIndexer(ctx context.Context, id int) error
- func (c *Client) DeleteIndexerProxy(ctx context.Context, id int) error
- func (c *Client) DeleteNotification(ctx context.Context, id int) error
- func (c *Client) DeleteTag(ctx context.Context, id int) error
- func (c *Client) DownloadClientAction(ctx context.Context, name string, body *DownloadClientResource) error
- func (c *Client) DownloadIndexerRelease(ctx context.Context, id int) (string, error)
- func (c *Client) GetAppProfile(ctx context.Context, id int) (*AppProfile, error)
- func (c *Client) GetAppProfileSchema(ctx context.Context) (*AppProfile, error)
- func (c *Client) GetAppProfiles(ctx context.Context) ([]AppProfile, error)
- func (c *Client) GetApplication(ctx context.Context, id int) (*Application, error)
- func (c *Client) GetApplicationSchema(ctx context.Context) ([]Application, error)
- func (c *Client) GetApplications(ctx context.Context) ([]Application, error)
- func (c *Client) GetBackups(ctx context.Context) ([]arr.Backup, error)
- func (c *Client) GetCommand(ctx context.Context, id int) (*arr.CommandResponse, error)
- func (c *Client) GetCommands(ctx context.Context) ([]arr.CommandResponse, error)
- func (c *Client) GetCustomFilter(ctx context.Context, id int) (*arr.CustomFilterResource, error)
- func (c *Client) GetCustomFilters(ctx context.Context) ([]arr.CustomFilterResource, error)
- func (c *Client) GetDevelopmentConfig(ctx context.Context) (*DevelopmentConfigResource, error)
- func (c *Client) GetDevelopmentConfigByID(ctx context.Context, id int) (*DevelopmentConfigResource, error)
- func (c *Client) GetDownloadClient(ctx context.Context, id int) (*DownloadClientResource, error)
- func (c *Client) GetDownloadClientConfig(ctx context.Context) (*arr.DownloadClientConfigResource, error)
- func (c *Client) GetDownloadClientConfigByID(ctx context.Context, id int) (*arr.DownloadClientConfigResource, error)
- func (c *Client) GetDownloadClientSchema(ctx context.Context) ([]DownloadClientResource, error)
- func (c *Client) GetDownloadClients(ctx context.Context) ([]DownloadClientResource, error)
- func (c *Client) GetFileSystemType(ctx context.Context, path string) (string, error)
- func (c *Client) GetHealth(ctx context.Context) ([]arr.HealthCheck, error)
- func (c *Client) GetHistory(ctx context.Context, page, pageSize int) (*arr.PagingResource[HistoryRecord], error)
- func (c *Client) GetHistoryByIndexer(ctx context.Context, indexerID, limit int) ([]HistoryRecord, error)
- func (c *Client) GetHistorySince(ctx context.Context, date string) ([]HistoryRecord, error)
- func (c *Client) GetHostConfig(ctx context.Context) (*arr.HostConfigResource, error)
- func (c *Client) GetHostConfigByID(ctx context.Context, id int) (*arr.HostConfigResource, error)
- func (c *Client) GetIndexer(ctx context.Context, id int) (*Indexer, error)
- func (c *Client) GetIndexerCategories(ctx context.Context) ([]IndexerCategory, error)
- func (c *Client) GetIndexerNewznab(ctx context.Context, id int) (string, error)
- func (c *Client) GetIndexerProxies(ctx context.Context) ([]IndexerProxyResource, error)
- func (c *Client) GetIndexerProxy(ctx context.Context, id int) (*IndexerProxyResource, error)
- func (c *Client) GetIndexerProxySchema(ctx context.Context) ([]IndexerProxyResource, error)
- func (c *Client) GetIndexerSchema(ctx context.Context) ([]Indexer, error)
- func (c *Client) GetIndexerStats(ctx context.Context, startDate, endDate string) (*IndexerStats, error)
- func (c *Client) GetIndexerStatuses(ctx context.Context) ([]IndexerStatus, error)
- func (c *Client) GetIndexers(ctx context.Context) ([]Indexer, error)
- func (c *Client) GetLocalization(ctx context.Context) (map[string]string, error)
- func (c *Client) GetLocalizationOptions(ctx context.Context) ([]LocalizationOption, error)
- func (c *Client) GetLogFileContent(ctx context.Context, filename string) (string, error)
- func (c *Client) GetLogFiles(ctx context.Context) ([]arr.LogFileResource, error)
- func (c *Client) GetLogs(ctx context.Context, page, pageSize int) (*arr.PagingResource[arr.LogRecord], error)
- func (c *Client) GetNotification(ctx context.Context, id int) (*arr.ProviderResource, error)
- func (c *Client) GetNotificationSchema(ctx context.Context) ([]arr.ProviderResource, error)
- func (c *Client) GetNotifications(ctx context.Context) ([]arr.ProviderResource, error)
- func (c *Client) GetSystemRoutes(ctx context.Context) ([]arr.SystemRouteResource, error)
- func (c *Client) GetSystemRoutesDuplicate(ctx context.Context) ([]arr.SystemRouteResource, error)
- func (c *Client) GetSystemStatus(ctx context.Context) (*arr.StatusResponse, error)
- func (c *Client) GetTag(ctx context.Context, id int) (*arr.Tag, error)
- func (c *Client) GetTagDetail(ctx context.Context, id int) (*arr.TagDetail, error)
- func (c *Client) GetTagDetails(ctx context.Context) ([]arr.TagDetail, error)
- func (c *Client) GetTags(ctx context.Context) ([]arr.Tag, error)
- func (c *Client) GetTask(ctx context.Context, id int) (*arr.TaskResource, error)
- func (c *Client) GetTasks(ctx context.Context) ([]arr.TaskResource, error)
- func (c *Client) GetUIConfig(ctx context.Context) (*arr.UIConfigResource, error)
- func (c *Client) GetUIConfigByID(ctx context.Context, id int) (*arr.UIConfigResource, error)
- func (c *Client) GetUpdateLogFileContent(ctx context.Context, filename string) (string, error)
- func (c *Client) GetUpdateLogFiles(ctx context.Context) ([]arr.LogFileResource, error)
- func (c *Client) GetUpdates(ctx context.Context) ([]arr.UpdateResource, error)
- func (c *Client) GrabRelease(ctx context.Context, release *Release) (*Release, error)
- func (c *Client) GrabReleasesBulk(ctx context.Context, releases []Release) (*Release, error)
- func (c *Client) HeadPing(ctx context.Context) error
- func (c *Client) IndexerAction(ctx context.Context, name string, body *Indexer) error
- func (c *Client) IndexerProxyAction(ctx context.Context, name string, body *IndexerProxyResource) error
- func (c *Client) NotificationAction(ctx context.Context, name string, body *arr.ProviderResource) error
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) Restart(ctx context.Context) error
- func (c *Client) RestoreBackup(ctx context.Context, id int) error
- func (c *Client) Search(ctx context.Context, opts *SearchOptions) ([]Release, error)
- func (c *Client) SendCommand(ctx context.Context, cmd arr.CommandRequest) (*arr.CommandResponse, error)
- func (c *Client) Shutdown(ctx context.Context) error
- func (c *Client) TestAllApplications(ctx context.Context) error
- func (c *Client) TestAllDownloadClients(ctx context.Context) error
- func (c *Client) TestAllIndexerProxies(ctx context.Context) error
- func (c *Client) TestAllIndexers(ctx context.Context) error
- func (c *Client) TestAllNotifications(ctx context.Context) error
- func (c *Client) TestApplication(ctx context.Context, app *Application) error
- func (c *Client) TestDownloadClient(ctx context.Context, dc *DownloadClientResource) error
- func (c *Client) TestIndexer(ctx context.Context, idx *Indexer) error
- func (c *Client) TestIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) error
- func (c *Client) TestNotification(ctx context.Context, n *arr.ProviderResource) error
- func (c *Client) UpdateAppProfile(ctx context.Context, profile *AppProfile) (*AppProfile, error)
- func (c *Client) UpdateApplication(ctx context.Context, app *Application) (*Application, error)
- func (c *Client) UpdateCustomFilter(ctx context.Context, filter *arr.CustomFilterResource) (*arr.CustomFilterResource, error)
- func (c *Client) UpdateDevelopmentConfig(ctx context.Context, config *DevelopmentConfigResource) (*DevelopmentConfigResource, error)
- func (c *Client) UpdateDownloadClient(ctx context.Context, dc *DownloadClientResource) (*DownloadClientResource, error)
- func (c *Client) UpdateDownloadClientConfig(ctx context.Context, config *arr.DownloadClientConfigResource) (*arr.DownloadClientConfigResource, error)
- func (c *Client) UpdateHostConfig(ctx context.Context, config *arr.HostConfigResource) (*arr.HostConfigResource, error)
- func (c *Client) UpdateIndexer(ctx context.Context, indexer *Indexer) (*Indexer, error)
- func (c *Client) UpdateIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) (*IndexerProxyResource, error)
- func (c *Client) UpdateNotification(ctx context.Context, n *arr.ProviderResource) (*arr.ProviderResource, error)
- func (c *Client) UpdateTag(ctx context.Context, tag *arr.Tag) (*arr.Tag, error)
- func (c *Client) UpdateUIConfig(ctx context.Context, config *arr.UIConfigResource) (*arr.UIConfigResource, error)
- func (c *Client) UploadBackup(ctx context.Context, fileName string, data io.Reader) error
- type DevelopmentConfigResource
- type DownloadClientResource
- type Field
- type HistoryRecord
- type HostStatistic
- type Indexer
- type IndexerBulkResource
- type IndexerCapability
- type IndexerCategory
- type IndexerProxyResource
- type IndexerStatistic
- type IndexerStats
- type IndexerStatus
- type IndexerStatusDetail
- type LocalizationOption
- type ProviderMessage
- type Release
- type SearchOptions
- type UserAgentStatistic
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppProfile ¶
type AppProfile struct {
ID int `json:"id"`
Name string `json:"name"`
EnableRss bool `json:"enableRss"`
EnableAutomaticSearch bool `json:"enableAutomaticSearch"`
EnableInteractiveSearch bool `json:"enableInteractiveSearch"`
MinimumSeeders int `json:"minimumSeeders"`
}
AppProfile defines search behavior settings for indexers.
type Application ¶
type Application struct {
ID int `json:"id"`
Name string `json:"name"`
Fields []Field `json:"fields,omitempty"`
ImplementationName string `json:"implementationName,omitempty"`
Implementation string `json:"implementation,omitempty"`
ConfigContract string `json:"configContract,omitempty"`
InfoLink string `json:"infoLink,omitempty"`
Message *ProviderMessage `json:"message,omitempty"`
Tags []int `json:"tags,omitempty"`
SyncLevel string `json:"syncLevel,omitempty"`
}
Application represents a connected PVR application (Sonarr, Radarr, etc.).
type ApplicationBulkResource ¶ added in v1.1.0
type ApplicationBulkResource struct {
IDs []int `json:"ids,omitempty"`
Tags []int `json:"tags,omitempty"`
ApplyTags string `json:"applyTags,omitempty"`
SyncLevel string `json:"syncLevel,omitempty"`
}
ApplicationBulkResource represents a bulk update for applications.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Prowlarr API client.
func (*Client) AddAppProfile ¶
func (c *Client) AddAppProfile(ctx context.Context, profile *AppProfile) (*AppProfile, error)
AddAppProfile creates a new app profile.
func (*Client) AddApplication ¶
func (c *Client) AddApplication(ctx context.Context, app *Application) (*Application, error)
AddApplication adds a new application to Prowlarr.
func (*Client) AddIndexer ¶
AddIndexer adds a new indexer to Prowlarr.
func (*Client) ApplicationAction ¶ added in v1.1.0
ApplicationAction triggers a named action on an application provider.
func (*Client) BrowseFileSystem ¶ added in v1.1.0
BrowseFileSystem returns directory/file listings for the given path.
func (*Client) BulkDeleteApplications ¶ added in v1.1.0
BulkDeleteApplications deletes multiple applications at once.
func (*Client) BulkDeleteDownloadClients ¶ added in v1.1.0
BulkDeleteDownloadClients deletes multiple download clients at once.
func (*Client) BulkDeleteIndexers ¶ added in v1.1.0
BulkDeleteIndexers deletes multiple indexers at once.
func (*Client) BulkUpdateApplications ¶ added in v1.1.0
func (c *Client) BulkUpdateApplications(ctx context.Context, bulk *ApplicationBulkResource) ([]Application, error)
BulkUpdateApplications updates multiple applications at once.
func (*Client) BulkUpdateDownloadClients ¶ added in v1.1.0
func (c *Client) BulkUpdateDownloadClients(ctx context.Context, bulk *arr.ProviderBulkResource) ([]DownloadClientResource, error)
BulkUpdateDownloadClients updates multiple download clients at once.
func (*Client) BulkUpdateIndexers ¶ added in v1.1.0
func (c *Client) BulkUpdateIndexers(ctx context.Context, bulk *IndexerBulkResource) ([]Indexer, error)
BulkUpdateIndexers updates multiple indexers at once.
func (*Client) CreateCustomFilter ¶ added in v1.1.0
func (c *Client) CreateCustomFilter(ctx context.Context, filter *arr.CustomFilterResource) (*arr.CustomFilterResource, error)
CreateCustomFilter creates a new custom filter.
func (*Client) CreateDownloadClient ¶ added in v1.1.0
func (c *Client) CreateDownloadClient(ctx context.Context, dc *DownloadClientResource) (*DownloadClientResource, error)
CreateDownloadClient creates a new download client.
func (*Client) CreateIndexerProxy ¶ added in v1.1.0
func (c *Client) CreateIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) (*IndexerProxyResource, error)
CreateIndexerProxy creates a new indexer proxy.
func (*Client) CreateNotification ¶ added in v1.1.0
func (c *Client) CreateNotification(ctx context.Context, n *arr.ProviderResource) (*arr.ProviderResource, error)
CreateNotification creates a new notification.
func (*Client) DeleteAppProfile ¶
DeleteAppProfile removes an app profile by its ID.
func (*Client) DeleteApplication ¶
DeleteApplication removes a connected application by its ID.
func (*Client) DeleteBackup ¶ added in v1.1.0
DeleteBackup deletes a backup by ID.
func (*Client) DeleteCommand ¶ added in v1.1.0
DeleteCommand deletes a command by ID.
func (*Client) DeleteCustomFilter ¶ added in v1.1.0
DeleteCustomFilter deletes a custom filter by ID.
func (*Client) DeleteDownloadClient ¶ added in v1.1.0
DeleteDownloadClient deletes a download client by ID.
func (*Client) DeleteIndexer ¶
DeleteIndexer removes an indexer by its database ID.
func (*Client) DeleteIndexerProxy ¶ added in v1.1.0
DeleteIndexerProxy deletes an indexer proxy by ID.
func (*Client) DeleteNotification ¶ added in v1.1.0
DeleteNotification deletes a notification by ID.
func (*Client) DownloadClientAction ¶ added in v1.1.0
func (c *Client) DownloadClientAction(ctx context.Context, name string, body *DownloadClientResource) error
DownloadClientAction triggers a named action on a download client provider.
func (*Client) DownloadIndexerRelease ¶ added in v1.1.0
DownloadIndexerRelease downloads a release from an indexer by ID.
func (*Client) GetAppProfile ¶
GetAppProfile returns a single app profile by its ID.
func (*Client) GetAppProfileSchema ¶ added in v1.1.0
func (c *Client) GetAppProfileSchema(ctx context.Context) (*AppProfile, error)
GetAppProfileSchema returns the app profile schema.
func (*Client) GetAppProfiles ¶
func (c *Client) GetAppProfiles(ctx context.Context) ([]AppProfile, error)
GetAppProfiles returns all app profiles.
func (*Client) GetApplication ¶
GetApplication returns a single application by its database ID.
func (*Client) GetApplicationSchema ¶ added in v1.1.0
func (c *Client) GetApplicationSchema(ctx context.Context) ([]Application, error)
GetApplicationSchema returns the schema for all application types.
func (*Client) GetApplications ¶
func (c *Client) GetApplications(ctx context.Context) ([]Application, error)
GetApplications returns all connected PVR applications.
func (*Client) GetBackups ¶ added in v1.1.0
GetBackups returns a list of all available backups.
func (*Client) GetCommand ¶
GetCommand returns the status of a single command by its ID.
func (*Client) GetCommands ¶
GetCommands returns all currently queued or running commands.
func (*Client) GetCustomFilter ¶ added in v1.1.0
GetCustomFilter returns a single custom filter by its ID.
func (*Client) GetCustomFilters ¶ added in v1.1.0
GetCustomFilters returns all custom filters.
func (*Client) GetDevelopmentConfig ¶ added in v1.1.0
func (c *Client) GetDevelopmentConfig(ctx context.Context) (*DevelopmentConfigResource, error)
GetDevelopmentConfig returns the development configuration.
func (*Client) GetDevelopmentConfigByID ¶ added in v1.1.0
func (c *Client) GetDevelopmentConfigByID(ctx context.Context, id int) (*DevelopmentConfigResource, error)
GetDevelopmentConfigByID returns the development config by its ID.
func (*Client) GetDownloadClient ¶ added in v1.1.0
GetDownloadClient returns a single download client by its ID.
func (*Client) GetDownloadClientConfig ¶ added in v1.1.0
func (c *Client) GetDownloadClientConfig(ctx context.Context) (*arr.DownloadClientConfigResource, error)
GetDownloadClientConfig returns the download client configuration.
func (*Client) GetDownloadClientConfigByID ¶ added in v1.1.0
func (c *Client) GetDownloadClientConfigByID(ctx context.Context, id int) (*arr.DownloadClientConfigResource, error)
GetDownloadClientConfigByID returns the download client config by its ID.
func (*Client) GetDownloadClientSchema ¶ added in v1.1.0
func (c *Client) GetDownloadClientSchema(ctx context.Context) ([]DownloadClientResource, error)
GetDownloadClientSchema returns the schema for all download client types.
func (*Client) GetDownloadClients ¶
func (c *Client) GetDownloadClients(ctx context.Context) ([]DownloadClientResource, error)
GetDownloadClients returns all configured download clients.
func (*Client) GetFileSystemType ¶ added in v1.1.0
GetFileSystemType returns the filesystem type for the given path.
func (*Client) GetHistory ¶
func (c *Client) GetHistory(ctx context.Context, page, pageSize int) (*arr.PagingResource[HistoryRecord], error)
GetHistory returns the indexer history with pagination.
func (*Client) GetHistoryByIndexer ¶
func (c *Client) GetHistoryByIndexer(ctx context.Context, indexerID, limit int) ([]HistoryRecord, error)
GetHistoryByIndexer returns history events for a specific indexer.
func (*Client) GetHistorySince ¶
GetHistorySince returns history events since a specific date (RFC 3339 timestamp).
func (*Client) GetHostConfig ¶ added in v1.1.0
GetHostConfig returns the host configuration.
func (*Client) GetHostConfigByID ¶ added in v1.1.0
GetHostConfigByID returns the host config by its ID.
func (*Client) GetIndexer ¶
GetIndexer returns a single indexer by its database ID.
func (*Client) GetIndexerCategories ¶
func (c *Client) GetIndexerCategories(ctx context.Context) ([]IndexerCategory, error)
GetIndexerCategories returns the global list of Newznab/Torznab categories.
func (*Client) GetIndexerNewznab ¶ added in v1.1.0
GetIndexerNewznab returns the Newznab/Torznab XML feed for an indexer.
func (*Client) GetIndexerProxies ¶ added in v1.1.0
func (c *Client) GetIndexerProxies(ctx context.Context) ([]IndexerProxyResource, error)
GetIndexerProxies returns all configured indexer proxies.
func (*Client) GetIndexerProxy ¶ added in v1.1.0
GetIndexerProxy returns a single indexer proxy by its ID.
func (*Client) GetIndexerProxySchema ¶ added in v1.1.0
func (c *Client) GetIndexerProxySchema(ctx context.Context) ([]IndexerProxyResource, error)
GetIndexerProxySchema returns the schema for all indexer proxy types.
func (*Client) GetIndexerSchema ¶ added in v1.1.0
GetIndexerSchema returns the schema for all indexer types.
func (*Client) GetIndexerStats ¶
func (c *Client) GetIndexerStats(ctx context.Context, startDate, endDate string) (*IndexerStats, error)
GetIndexerStats returns aggregated indexer statistics for the given date range.
func (*Client) GetIndexerStatuses ¶
func (c *Client) GetIndexerStatuses(ctx context.Context) ([]IndexerStatus, error)
GetIndexerStatuses returns the status of all indexers (including disabled ones).
func (*Client) GetIndexers ¶
GetIndexers returns all configured indexers.
func (*Client) GetLocalization ¶ added in v1.1.0
GetLocalization returns the localization strings.
func (*Client) GetLocalizationOptions ¶ added in v1.1.0
func (c *Client) GetLocalizationOptions(ctx context.Context) ([]LocalizationOption, error)
GetLocalizationOptions returns available localization language options.
func (*Client) GetLogFileContent ¶ added in v1.1.0
GetLogFileContent returns the content of a specific log file by filename.
func (*Client) GetLogFiles ¶ added in v1.1.0
GetLogFiles returns a list of log files.
func (*Client) GetLogs ¶ added in v1.1.0
func (c *Client) GetLogs(ctx context.Context, page, pageSize int) (*arr.PagingResource[arr.LogRecord], error)
GetLogs returns log entries with pagination.
func (*Client) GetNotification ¶ added in v1.1.0
GetNotification returns a single notification by its ID.
func (*Client) GetNotificationSchema ¶ added in v1.1.0
GetNotificationSchema returns the schema for all notification types.
func (*Client) GetNotifications ¶ added in v1.1.0
GetNotifications returns all configured notifications.
func (*Client) GetSystemRoutes ¶ added in v1.1.0
GetSystemRoutes returns all API routes.
func (*Client) GetSystemRoutesDuplicate ¶ added in v1.1.0
GetSystemRoutesDuplicate returns duplicate API routes.
func (*Client) GetSystemStatus ¶
GetSystemStatus returns Prowlarr system information.
func (*Client) GetTagDetail ¶ added in v1.1.0
GetTagDetail returns a single tag detail by its ID.
func (*Client) GetTagDetails ¶ added in v1.1.0
GetTagDetails returns all tags with details about their usage.
func (*Client) GetUIConfig ¶ added in v1.1.0
GetUIConfig returns the UI configuration.
func (*Client) GetUIConfigByID ¶ added in v1.1.0
GetUIConfigByID returns the UI config by its ID.
func (*Client) GetUpdateLogFileContent ¶ added in v1.1.0
GetUpdateLogFileContent returns the content of a specific update log file.
func (*Client) GetUpdateLogFiles ¶ added in v1.1.0
GetUpdateLogFiles returns a list of update log files.
func (*Client) GetUpdates ¶ added in v1.1.0
GetUpdates returns available application updates.
func (*Client) GrabRelease ¶
GrabRelease sends a release to the download client.
func (*Client) GrabReleasesBulk ¶ added in v1.1.0
GrabReleasesBulk sends multiple releases to the download client.
func (*Client) IndexerAction ¶ added in v1.1.0
IndexerAction triggers a named action on an indexer provider.
func (*Client) IndexerProxyAction ¶ added in v1.1.0
func (c *Client) IndexerProxyAction(ctx context.Context, name string, body *IndexerProxyResource) error
IndexerProxyAction triggers a named action on an indexer proxy provider.
func (*Client) NotificationAction ¶ added in v1.1.0
func (c *Client) NotificationAction(ctx context.Context, name string, body *arr.ProviderResource) error
NotificationAction triggers a named action on a notification provider.
func (*Client) RestoreBackup ¶ added in v1.1.0
RestoreBackup triggers a restore from a backup by ID.
func (*Client) SendCommand ¶
func (c *Client) SendCommand(ctx context.Context, cmd arr.CommandRequest) (*arr.CommandResponse, error)
SendCommand triggers a named command.
func (*Client) TestAllApplications ¶ added in v1.1.0
TestAllApplications tests all configured applications.
func (*Client) TestAllDownloadClients ¶ added in v1.1.0
TestAllDownloadClients tests all configured download clients.
func (*Client) TestAllIndexerProxies ¶ added in v1.1.0
TestAllIndexerProxies tests all configured indexer proxies.
func (*Client) TestAllIndexers ¶ added in v1.1.0
TestAllIndexers tests all configured indexers.
func (*Client) TestAllNotifications ¶ added in v1.1.0
TestAllNotifications tests all configured notifications.
func (*Client) TestApplication ¶ added in v1.1.0
func (c *Client) TestApplication(ctx context.Context, app *Application) error
TestApplication tests an application configuration.
func (*Client) TestDownloadClient ¶ added in v1.1.0
func (c *Client) TestDownloadClient(ctx context.Context, dc *DownloadClientResource) error
TestDownloadClient tests a download client configuration.
func (*Client) TestIndexer ¶ added in v1.1.0
TestIndexer tests an indexer configuration.
func (*Client) TestIndexerProxy ¶ added in v1.1.0
func (c *Client) TestIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) error
TestIndexerProxy tests an indexer proxy configuration.
func (*Client) TestNotification ¶ added in v1.1.0
TestNotification tests a notification configuration.
func (*Client) UpdateAppProfile ¶
func (c *Client) UpdateAppProfile(ctx context.Context, profile *AppProfile) (*AppProfile, error)
UpdateAppProfile updates an existing app profile.
func (*Client) UpdateApplication ¶
func (c *Client) UpdateApplication(ctx context.Context, app *Application) (*Application, error)
UpdateApplication updates an existing application.
func (*Client) UpdateCustomFilter ¶ added in v1.1.0
func (c *Client) UpdateCustomFilter(ctx context.Context, filter *arr.CustomFilterResource) (*arr.CustomFilterResource, error)
UpdateCustomFilter updates an existing custom filter.
func (*Client) UpdateDevelopmentConfig ¶ added in v1.1.0
func (c *Client) UpdateDevelopmentConfig(ctx context.Context, config *DevelopmentConfigResource) (*DevelopmentConfigResource, error)
UpdateDevelopmentConfig updates the development configuration.
func (*Client) UpdateDownloadClient ¶ added in v1.1.0
func (c *Client) UpdateDownloadClient(ctx context.Context, dc *DownloadClientResource) (*DownloadClientResource, error)
UpdateDownloadClient updates an existing download client.
func (*Client) UpdateDownloadClientConfig ¶ added in v1.1.0
func (c *Client) UpdateDownloadClientConfig(ctx context.Context, config *arr.DownloadClientConfigResource) (*arr.DownloadClientConfigResource, error)
UpdateDownloadClientConfig updates the download client configuration.
func (*Client) UpdateHostConfig ¶ added in v1.1.0
func (c *Client) UpdateHostConfig(ctx context.Context, config *arr.HostConfigResource) (*arr.HostConfigResource, error)
UpdateHostConfig updates the host configuration.
func (*Client) UpdateIndexer ¶
UpdateIndexer updates an existing indexer.
func (*Client) UpdateIndexerProxy ¶ added in v1.1.0
func (c *Client) UpdateIndexerProxy(ctx context.Context, proxy *IndexerProxyResource) (*IndexerProxyResource, error)
UpdateIndexerProxy updates an existing indexer proxy.
func (*Client) UpdateNotification ¶ added in v1.1.0
func (c *Client) UpdateNotification(ctx context.Context, n *arr.ProviderResource) (*arr.ProviderResource, error)
UpdateNotification updates an existing notification.
func (*Client) UpdateUIConfig ¶ added in v1.1.0
func (c *Client) UpdateUIConfig(ctx context.Context, config *arr.UIConfigResource) (*arr.UIConfigResource, error)
UpdateUIConfig updates the UI configuration.
type DevelopmentConfigResource ¶ added in v1.1.0
type DevelopmentConfigResource struct {
ID int `json:"id"`
ConsoleLogLevel string `json:"consoleLogLevel,omitempty"`
LogSql bool `json:"logSql"`
LogIndexerResponse bool `json:"logIndexerResponse"`
LogRotate int `json:"logRotate"`
FilterSentryEvents bool `json:"filterSentryEvents"`
}
DevelopmentConfigResource represents Prowlarr development configuration.
type DownloadClientResource ¶
type DownloadClientResource struct {
ID int `json:"id"`
Name string `json:"name"`
Fields []Field `json:"fields,omitempty"`
ImplementationName string `json:"implementationName,omitempty"`
Implementation string `json:"implementation,omitempty"`
ConfigContract string `json:"configContract,omitempty"`
Tags []int `json:"tags,omitempty"`
Enable bool `json:"enable"`
Protocol string `json:"protocol,omitempty"`
Priority int `json:"priority"`
}
DownloadClientResource represents a download client configured in Prowlarr.
type Field ¶
type Field struct {
Order int `json:"order"`
Name string `json:"name,omitempty"`
Label string `json:"label,omitempty"`
HelpText string `json:"helpText,omitempty"`
Value any `json:"value,omitempty"`
Type string `json:"type,omitempty"`
Advanced bool `json:"advanced"`
}
Field represents a configurable field for a provider (indexer, application, etc.).
type HistoryRecord ¶
type HistoryRecord struct {
ID int `json:"id"`
IndexerID int `json:"indexerId"`
Date string `json:"date"`
DownloadID string `json:"downloadId,omitempty"`
Successful bool `json:"successful"`
EventType string `json:"eventType"`
Data map[string]string `json:"data,omitempty"`
}
HistoryRecord represents an indexer event in Prowlarr history.
type HostStatistic ¶
type HostStatistic struct {
Host string `json:"host,omitempty"`
NumberOfQueries int `json:"numberOfQueries"`
NumberOfGrabs int `json:"numberOfGrabs"`
}
HostStatistic contains query/grab stats for a host.
type Indexer ¶
type Indexer struct {
ID int `json:"id"`
Name string `json:"name"`
Fields []Field `json:"fields,omitempty"`
ImplementationName string `json:"implementationName,omitempty"`
Implementation string `json:"implementation,omitempty"`
ConfigContract string `json:"configContract,omitempty"`
InfoLink string `json:"infoLink,omitempty"`
Message *ProviderMessage `json:"message,omitempty"`
Tags []int `json:"tags,omitempty"`
IndexerURLs []string `json:"indexerUrls,omitempty"`
LegacyURLs []string `json:"legacyUrls,omitempty"`
DefinitionName string `json:"definitionName,omitempty"`
Description string `json:"description,omitempty"`
Language string `json:"language,omitempty"`
Encoding string `json:"encoding,omitempty"`
Enable bool `json:"enable"`
Redirect bool `json:"redirect"`
SupportsRss bool `json:"supportsRss"`
SupportsSearch bool `json:"supportsSearch"`
SupportsRedirect bool `json:"supportsRedirect"`
SupportsPagination bool `json:"supportsPagination"`
AppProfileID int `json:"appProfileId"`
Protocol string `json:"protocol,omitempty"`
Privacy string `json:"privacy,omitempty"`
Capabilities *IndexerCapability `json:"capabilities,omitempty"`
Priority int `json:"priority"`
DownloadClientID int `json:"downloadClientId,omitempty"`
Added string `json:"added,omitempty"`
Status *IndexerStatusDetail `json:"status,omitempty"`
SortName string `json:"sortName,omitempty"`
}
Indexer represents a configured indexer in Prowlarr.
type IndexerBulkResource ¶ added in v1.1.0
type IndexerBulkResource struct {
IDs []int `json:"ids,omitempty"`
Tags []int `json:"tags,omitempty"`
ApplyTags string `json:"applyTags,omitempty"`
Enable *bool `json:"enable,omitempty"`
AppProfileID *int `json:"appProfileId,omitempty"`
Priority *int `json:"priority,omitempty"`
MinimumSeeders *int `json:"minimumSeeders,omitempty"`
SeedRatio *float64 `json:"seedRatio,omitempty"`
SeedTime *int `json:"seedTime,omitempty"`
PackSeedTime *int `json:"packSeedTime,omitempty"`
PreferMagnetURL *bool `json:"preferMagnetUrl,omitempty"`
}
IndexerBulkResource represents a bulk update for indexers.
type IndexerCapability ¶
type IndexerCapability struct {
ID int `json:"id"`
LimitsMax *int `json:"limitsMax,omitempty"`
LimitsDefault *int `json:"limitsDefault,omitempty"`
Categories []IndexerCategory `json:"categories,omitempty"`
SupportsRawSearch bool `json:"supportsRawSearch"`
}
IndexerCapability describes the search capabilities of an indexer.
type IndexerCategory ¶
type IndexerCategory struct {
ID int `json:"id"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
SubCategories []IndexerCategory `json:"subCategories,omitempty"`
}
IndexerCategory represents a Newznab/Torznab category.
type IndexerProxyResource ¶ added in v1.1.0
type IndexerProxyResource struct {
ID int `json:"id"`
Name string `json:"name,omitempty"`
Fields []Field `json:"fields,omitempty"`
ImplementationName string `json:"implementationName,omitempty"`
Implementation string `json:"implementation,omitempty"`
ConfigContract string `json:"configContract,omitempty"`
InfoLink string `json:"infoLink,omitempty"`
Message *ProviderMessage `json:"message,omitempty"`
Tags []int `json:"tags,omitempty"`
Presets []IndexerProxyResource `json:"presets,omitempty"`
Link string `json:"link,omitempty"`
OnHealthIssue bool `json:"onHealthIssue"`
SupportsOnHealthIssue bool `json:"supportsOnHealthIssue"`
IncludeHealthWarnings bool `json:"includeHealthWarnings"`
TestCommand string `json:"testCommand,omitempty"`
}
IndexerProxyResource represents a configured indexer proxy in Prowlarr.
type IndexerStatistic ¶
type IndexerStatistic struct {
IndexerID int `json:"indexerId"`
IndexerName string `json:"indexerName,omitempty"`
AverageResponseTime int `json:"averageResponseTime"`
AverageGrabResponseTime int `json:"averageGrabResponseTime"`
NumberOfQueries int `json:"numberOfQueries"`
NumberOfGrabs int `json:"numberOfGrabs"`
NumberOfRssQueries int `json:"numberOfRssQueries"`
NumberOfAuthQueries int `json:"numberOfAuthQueries"`
NumberOfFailedQueries int `json:"numberOfFailedQueries"`
NumberOfFailedGrabs int `json:"numberOfFailedGrabs"`
NumberOfFailedRssQueries int `json:"numberOfFailedRssQueries"`
NumberOfFailedAuthQueries int `json:"numberOfFailedAuthQueries"`
}
IndexerStatistic contains usage statistics for a single indexer.
type IndexerStats ¶
type IndexerStats struct {
ID int `json:"id"`
Indexers []IndexerStatistic `json:"indexers,omitempty"`
UserAgents []UserAgentStatistic `json:"userAgents,omitempty"`
Hosts []HostStatistic `json:"hosts,omitempty"`
}
IndexerStats contains aggregated statistics for all indexers.
type IndexerStatus ¶
type IndexerStatus struct {
ID int `json:"id"`
IndexerID int `json:"indexerId"`
DisabledTill string `json:"disabledTill,omitempty"`
MostRecentFailure string `json:"mostRecentFailure,omitempty"`
InitialFailure string `json:"initialFailure,omitempty"`
}
IndexerStatus represents the current status of an indexer.
type IndexerStatusDetail ¶
type IndexerStatusDetail struct {
ID int `json:"id"`
IndexerID int `json:"indexerId"`
DisabledTill string `json:"disabledTill,omitempty"`
MostRecentFailure string `json:"mostRecentFailure,omitempty"`
InitialFailure string `json:"initialFailure,omitempty"`
}
IndexerStatusDetail is the inline status embedded in an IndexerResource.
type LocalizationOption ¶ added in v1.1.0
type LocalizationOption struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
}
LocalizationOption represents a localization language option.
type ProviderMessage ¶
type ProviderMessage struct {
Message string `json:"message,omitempty"`
Type string `json:"type,omitempty"`
}
ProviderMessage contains informational or warning messages from a provider.
type Release ¶
type Release struct {
ID int `json:"id"`
GUID string `json:"guid,omitempty"`
Age int `json:"age"`
AgeHours float64 `json:"ageHours"`
AgeMinutes float64 `json:"ageMinutes"`
Size int64 `json:"size"`
Files *int `json:"files,omitempty"`
Grabs *int `json:"grabs,omitempty"`
IndexerID int `json:"indexerId"`
Indexer string `json:"indexer,omitempty"`
Title string `json:"title,omitempty"`
SortTitle string `json:"sortTitle,omitempty"`
ImdbID int `json:"imdbId,omitempty"`
TmdbID int `json:"tmdbId,omitempty"`
TvdbID int `json:"tvdbId,omitempty"`
PublishDate string `json:"publishDate,omitempty"`
CommentURL string `json:"commentUrl,omitempty"`
DownloadURL string `json:"downloadUrl,omitempty"`
InfoURL string `json:"infoUrl,omitempty"`
PosterURL string `json:"posterUrl,omitempty"`
IndexerFlags []string `json:"indexerFlags,omitempty"`
Categories []IndexerCategory `json:"categories,omitempty"`
MagnetURL string `json:"magnetUrl,omitempty"`
InfoHash string `json:"infoHash,omitempty"`
Seeders *int `json:"seeders,omitempty"`
Leechers *int `json:"leechers,omitempty"`
Protocol string `json:"protocol,omitempty"`
FileName string `json:"fileName,omitempty"`
DownloadClientID *int `json:"downloadClientId,omitempty"`
}
Release represents a search result from an indexer.
type SearchOptions ¶
type SearchOptions struct {
Query string
Type string // "search", "tvsearch", "movie", "music", "book"
IndexerIDs []int
Categories []int
Limit int
Offset int
}
SearchOptions configures a search request.
type UserAgentStatistic ¶
type UserAgentStatistic struct {
UserAgent string `json:"userAgent,omitempty"`
NumberOfQueries int `json:"numberOfQueries"`
NumberOfGrabs int `json:"numberOfGrabs"`
}
UserAgentStatistic contains query/grab stats for a user agent.