prowlarr-go

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MPL-2.0

README

Go API client for prowlarr

Prowlarr API docs

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • Package version: 0.3.0
  • API version: 1.0.0

  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import prowlarr "github.com/devopsarr/prowlarr-go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), prowlarr.ContextServerIndex, 1)
Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), prowlarr.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), prowlarr.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), prowlarr.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost:9696

Class Method HTTP request Description
ApiInfoApi GetApi Get /api
AppProfileApi CreateAppProfile Post /api/v1/appprofile
AppProfileApi DeleteAppProfile Delete /api/v1/appprofile/{id}
AppProfileApi GetAppProfileById Get /api/v1/appprofile/{id}
AppProfileApi ListAppProfile Get /api/v1/appprofile
AppProfileApi UpdateAppProfile Put /api/v1/appprofile/{id}
ApplicationApi CreateApplications Post /api/v1/applications
ApplicationApi CreateApplicationsActionByName Post /api/v1/applications/action/{name}
ApplicationApi DeleteApplications Delete /api/v1/applications/{id}
ApplicationApi GetApplicationsById Get /api/v1/applications/{id}
ApplicationApi ListApplications Get /api/v1/applications
ApplicationApi ListApplicationsSchema Get /api/v1/applications/schema
ApplicationApi TestApplications Post /api/v1/applications/test
ApplicationApi TestallApplications Post /api/v1/applications/testall
ApplicationApi UpdateApplications Put /api/v1/applications/{id}
AuthenticationApi CreateLogin Post /login
AuthenticationApi GetLogout Get /logout
BackupApi CreateSystemBackupRestoreById Post /api/v1/system/backup/restore/{id}
BackupApi CreateSystemBackupRestoreUpload Post /api/v1/system/backup/restore/upload
BackupApi DeleteSystemBackup Delete /api/v1/system/backup/{id}
BackupApi ListSystemBackup Get /api/v1/system/backup
CommandApi CreateCommand Post /api/v1/command
CommandApi DeleteCommand Delete /api/v1/command/{id}
CommandApi GetCommandById Get /api/v1/command/{id}
CommandApi ListCommand Get /api/v1/command
CustomFilterApi CreateCustomFilter Post /api/v1/customfilter
CustomFilterApi DeleteCustomFilter Delete /api/v1/customfilter/{id}
CustomFilterApi GetCustomFilterById Get /api/v1/customfilter/{id}
CustomFilterApi ListCustomFilter Get /api/v1/customfilter
CustomFilterApi UpdateCustomFilter Put /api/v1/customfilter/{id}
DevelopmentConfigApi GetDevelopmentConfig Get /api/v1/config/development
DevelopmentConfigApi GetDevelopmentConfigById Get /api/v1/config/development/{id}
DevelopmentConfigApi UpdateDevelopmentConfig Put /api/v1/config/development/{id}
DownloadClientApi CreateDownloadClient Post /api/v1/downloadclient
DownloadClientApi CreateDownloadClientActionByName Post /api/v1/downloadclient/action/{name}
DownloadClientApi DeleteDownloadClient Delete /api/v1/downloadclient/{id}
DownloadClientApi GetDownloadClientById Get /api/v1/downloadclient/{id}
DownloadClientApi ListDownloadClient Get /api/v1/downloadclient
DownloadClientApi ListDownloadClientSchema Get /api/v1/downloadclient/schema
DownloadClientApi TestDownloadClient Post /api/v1/downloadclient/test
DownloadClientApi TestallDownloadClient Post /api/v1/downloadclient/testall
DownloadClientApi UpdateDownloadClient Put /api/v1/downloadclient/{id}
DownloadClientConfigApi GetDownloadClientConfig Get /api/v1/config/downloadclient
DownloadClientConfigApi GetDownloadClientConfigById Get /api/v1/config/downloadclient/{id}
DownloadClientConfigApi UpdateDownloadClientConfig Put /api/v1/config/downloadclient/{id}
FileSystemApi GetFileSystem Get /api/v1/filesystem
FileSystemApi GetFileSystemType Get /api/v1/filesystem/type
HealthApi GetHealthById Get /api/v1/health/{id}
HealthApi ListHealth Get /api/v1/health
HistoryApi GetHistory Get /api/v1/history
HistoryApi ListHistoryIndexer Get /api/v1/history/indexer
HistoryApi ListHistorySince Get /api/v1/history/since
HostConfigApi GetHostConfig Get /api/v1/config/host
HostConfigApi GetHostConfigById Get /api/v1/config/host/{id}
HostConfigApi UpdateHostConfig Put /api/v1/config/host/{id}
IndexerApi CreateIndexer Post /api/v1/indexer
IndexerApi CreateIndexerActionByName Post /api/v1/indexer/action/{name}
IndexerApi DeleteIndexer Delete /api/v1/indexer/{id}
IndexerApi GetIndexerById Get /api/v1/indexer/{id}
IndexerApi ListIndexer Get /api/v1/indexer
IndexerApi ListIndexerSchema Get /api/v1/indexer/schema
IndexerApi TestIndexer Post /api/v1/indexer/test
IndexerApi TestallIndexer Post /api/v1/indexer/testall
IndexerApi UpdateIndexer Put /api/v1/indexer/{id}
IndexerDefaultCategoriesApi ListIndexerCategories Get /api/v1/indexer/categories
IndexerEditorApi DeleteIndexerEditor Delete /api/v1/indexer/editor
IndexerEditorApi PutIndexerEditor Put /api/v1/indexer/editor
IndexerProxyApi CreateIndexerProxy Post /api/v1/indexerproxy
IndexerProxyApi CreateIndexerProxyActionByName Post /api/v1/indexerproxy/action/{name}
IndexerProxyApi DeleteIndexerProxy Delete /api/v1/indexerproxy/{id}
IndexerProxyApi GetIndexerProxyById Get /api/v1/indexerproxy/{id}
IndexerProxyApi ListIndexerProxy Get /api/v1/indexerproxy
IndexerProxyApi ListIndexerProxySchema Get /api/v1/indexerproxy/schema
IndexerProxyApi TestIndexerProxy Post /api/v1/indexerproxy/test
IndexerProxyApi TestallIndexerProxy Post /api/v1/indexerproxy/testall
IndexerProxyApi UpdateIndexerProxy Put /api/v1/indexerproxy/{id}
IndexerStatsApi GetIndexerStats Get /api/v1/indexerstats
IndexerStatusApi GetIndexerStatusById Get /api/v1/indexerstatus/{id}
IndexerStatusApi ListIndexerStatus Get /api/v1/indexerstatus
InitializeJsApi GetInitializeJs Get /initialize.js
LocalizationApi GetLocalization Get /api/v1/localization
LocalizationApi ListLocalizationOptions Get /api/v1/localization/options
LogApi GetLog Get /api/v1/log
LogFileApi GetLogFileByFilename Get /api/v1/log/file/{filename}
LogFileApi ListLogFile Get /api/v1/log/file
NewznabApi GetIndexeridDownload Get /api/v1/indexer/{id}/download
NewznabApi GetIndexeridNewznab Get /api/v1/indexer/{id}/newznab
NewznabApi GetidApi Get /{id}/api
NewznabApi GetidDownload Get /{id}/download
NotificationApi CreateNotification Post /api/v1/notification
NotificationApi CreateNotificationActionByName Post /api/v1/notification/action/{name}
NotificationApi DeleteNotification Delete /api/v1/notification/{id}
NotificationApi GetNotificationById Get /api/v1/notification/{id}
NotificationApi ListNotification Get /api/v1/notification
NotificationApi ListNotificationSchema Get /api/v1/notification/schema
NotificationApi TestNotification Post /api/v1/notification/test
NotificationApi TestallNotification Post /api/v1/notification/testall
NotificationApi UpdateNotification Put /api/v1/notification/{id}
PingApi GetPing Get /ping
QualityProfileSchemaApi GetAppprofileSchema Get /api/v1/appprofile/schema
SearchApi CreateSearch Post /api/v1/search
SearchApi CreateSearchBulk Post /api/v1/search/bulk
SearchApi GetSearchById Get /api/v1/search/{id}
SearchApi ListSearch Get /api/v1/search
StaticResourceApi Get Get /
StaticResourceApi GetByPath Get /{path}
StaticResourceApi GetContentByPath Get /content/{path}
StaticResourceApi GetLogin Get /login
SystemApi CreateSystemRestart Post /api/v1/system/restart
SystemApi CreateSystemShutdown Post /api/v1/system/shutdown
SystemApi GetSystemRoutes Get /api/v1/system/routes
SystemApi GetSystemRoutesDuplicate Get /api/v1/system/routes/duplicate
SystemApi GetSystemStatus Get /api/v1/system/status
TagApi CreateTag Post /api/v1/tag
TagApi DeleteTag Delete /api/v1/tag/{id}
TagApi GetTagById Get /api/v1/tag/{id}
TagApi ListTag Get /api/v1/tag
TagApi UpdateTag Put /api/v1/tag/{id}
TagDetailsApi GetTagDetailById Get /api/v1/tag/detail/{id}
TagDetailsApi ListTagDetail Get /api/v1/tag/detail
TaskApi GetSystemTaskById Get /api/v1/system/task/{id}
TaskApi ListSystemTask Get /api/v1/system/task
UiConfigApi GetUiConfig Get /api/v1/config/ui
UiConfigApi GetUiConfigById Get /api/v1/config/ui/{id}
UiConfigApi UpdateUiConfig Put /api/v1/config/ui/{id}
UpdateApi ListUpdate Get /api/v1/update
UpdateLogFileApi GetLogFileUpdateByFilename Get /api/v1/log/file/update/{filename}
UpdateLogFileApi ListLogFileUpdate Get /api/v1/log/file/update

Documentation For Models

Documentation For Authorization

X-Api-Key
  • Type: API key
  • API key parameter name: X-Api-Key
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: X-Api-Key and passed in as the auth context for each request.

apikey
  • Type: API key
  • API key parameter name: apikey
  • Location: URL query string

Note, each API key must be added to a map of map[string]APIKey where the key is: apikey and passed in as the auth context for each request.

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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