Skip to content

cvele/sonarr-go-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for openapi

Sonarr 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.

  • API version: 3.0.0
  • Package 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 openapi "github.com/cvele/sonarr-go-sdk"

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(), openapi.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(), openapi.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(), openapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

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

Class Method HTTP request Description
AuthenticationApi LoginPost Post /login
AuthenticationApi LogoutGet Get /logout
BackupApi ApiV3SystemBackupGet Get /api/v3/system/backup
BackupApi ApiV3SystemBackupIdDelete Delete /api/v3/system/backup/{id}
BackupApi ApiV3SystemBackupRestoreIdPost Post /api/v3/system/backup/restore/{id}
BackupApi ApiV3SystemBackupRestoreUploadPost Post /api/v3/system/backup/restore/upload
BlocklistApi ApiV3BlocklistBulkDelete Delete /api/v3/blocklist/bulk
BlocklistApi ApiV3BlocklistGet Get /api/v3/blocklist
BlocklistApi ApiV3BlocklistIdDelete Delete /api/v3/blocklist/{id}
CalendarApi ApiV3CalendarGet Get /api/v3/calendar
CalendarApi ApiV3CalendarIdGet Get /api/v3/calendar/{id}
CalendarFeedApi FeedV3CalendarSonarrIcsGet Get /feed/v3/calendar/sonarr.ics
CommandApi ApiV3CommandGet Get /api/v3/command
CommandApi ApiV3CommandIdDelete Delete /api/v3/command/{id}
CommandApi ApiV3CommandIdGet Get /api/v3/command/{id}
CommandApi ApiV3CommandPost Post /api/v3/command
CustomFilterApi ApiV3CustomfilterGet Get /api/v3/customfilter
CustomFilterApi ApiV3CustomfilterIdDelete Delete /api/v3/customfilter/{id}
CustomFilterApi ApiV3CustomfilterIdGet Get /api/v3/customfilter/{id}
CustomFilterApi ApiV3CustomfilterIdPut Put /api/v3/customfilter/{id}
CustomFilterApi ApiV3CustomfilterPost Post /api/v3/customfilter
CustomFormatApi ApiV3CustomformatGet Get /api/v3/customformat
CustomFormatApi ApiV3CustomformatIdDelete Delete /api/v3/customformat/{id}
CustomFormatApi ApiV3CustomformatIdGet Get /api/v3/customformat/{id}
CustomFormatApi ApiV3CustomformatIdPut Put /api/v3/customformat/{id}
CustomFormatApi ApiV3CustomformatPost Post /api/v3/customformat
CustomFormatApi ApiV3CustomformatSchemaGet Get /api/v3/customformat/schema
CutoffApi ApiV3WantedCutoffGet Get /api/v3/wanted/cutoff
CutoffApi ApiV3WantedCutoffIdGet Get /api/v3/wanted/cutoff/{id}
DelayProfileApi ApiV3DelayprofileGet Get /api/v3/delayprofile
DelayProfileApi ApiV3DelayprofileIdDelete Delete /api/v3/delayprofile/{id}
DelayProfileApi ApiV3DelayprofileIdGet Get /api/v3/delayprofile/{id}
DelayProfileApi ApiV3DelayprofileIdPut Put /api/v3/delayprofile/{id}
DelayProfileApi ApiV3DelayprofilePost Post /api/v3/delayprofile
DelayProfileApi ApiV3DelayprofileReorderIdPut Put /api/v3/delayprofile/reorder/{id}
DiskSpaceApi ApiV3DiskspaceGet Get /api/v3/diskspace
DownloadClientApi ApiV3DownloadclientActionNamePost Post /api/v3/downloadclient/action/{name}
DownloadClientApi ApiV3DownloadclientGet Get /api/v3/downloadclient
DownloadClientApi ApiV3DownloadclientIdDelete Delete /api/v3/downloadclient/{id}
DownloadClientApi ApiV3DownloadclientIdGet Get /api/v3/downloadclient/{id}
DownloadClientApi ApiV3DownloadclientIdPut Put /api/v3/downloadclient/{id}
DownloadClientApi ApiV3DownloadclientPost Post /api/v3/downloadclient
DownloadClientApi ApiV3DownloadclientSchemaGet Get /api/v3/downloadclient/schema
DownloadClientApi ApiV3DownloadclientTestPost Post /api/v3/downloadclient/test
DownloadClientApi ApiV3DownloadclientTestallPost Post /api/v3/downloadclient/testall
DownloadClientConfigApi ApiV3ConfigDownloadclientGet Get /api/v3/config/downloadclient
DownloadClientConfigApi ApiV3ConfigDownloadclientIdGet Get /api/v3/config/downloadclient/{id}
DownloadClientConfigApi ApiV3ConfigDownloadclientIdPut Put /api/v3/config/downloadclient/{id}
EpisodeApi ApiV3EpisodeGet Get /api/v3/episode
EpisodeApi ApiV3EpisodeIdGet Get /api/v3/episode/{id}
EpisodeApi ApiV3EpisodeIdPut Put /api/v3/episode/{id}
EpisodeApi ApiV3EpisodeMonitorPut Put /api/v3/episode/monitor
EpisodeFileApi ApiV3EpisodefileBulkDelete Delete /api/v3/episodefile/bulk
EpisodeFileApi ApiV3EpisodefileBulkPut Put /api/v3/episodefile/bulk
EpisodeFileApi ApiV3EpisodefileEditorPut Put /api/v3/episodefile/editor
EpisodeFileApi ApiV3EpisodefileGet Get /api/v3/episodefile
EpisodeFileApi ApiV3EpisodefileIdDelete Delete /api/v3/episodefile/{id}
EpisodeFileApi ApiV3EpisodefileIdGet Get /api/v3/episodefile/{id}
EpisodeFileApi ApiV3EpisodefileIdPut Put /api/v3/episodefile/{id}
FileSystemApi ApiV3FilesystemGet Get /api/v3/filesystem
FileSystemApi ApiV3FilesystemMediafilesGet Get /api/v3/filesystem/mediafiles
FileSystemApi ApiV3FilesystemTypeGet Get /api/v3/filesystem/type
HealthApi ApiV3HealthGet Get /api/v3/health
HealthApi ApiV3HealthIdGet Get /api/v3/health/{id}
HistoryApi ApiV3HistoryFailedIdPost Post /api/v3/history/failed/{id}
HistoryApi ApiV3HistoryGet Get /api/v3/history
HistoryApi ApiV3HistorySeriesGet Get /api/v3/history/series
HistoryApi ApiV3HistorySinceGet Get /api/v3/history/since
HostConfigApi ApiV3ConfigHostGet Get /api/v3/config/host
HostConfigApi ApiV3ConfigHostIdGet Get /api/v3/config/host/{id}
HostConfigApi ApiV3ConfigHostIdPut Put /api/v3/config/host/{id}
ImportListApi ApiV3ImportlistActionNamePost Post /api/v3/importlist/action/{name}
ImportListApi ApiV3ImportlistGet Get /api/v3/importlist
ImportListApi ApiV3ImportlistIdDelete Delete /api/v3/importlist/{id}
ImportListApi ApiV3ImportlistIdGet Get /api/v3/importlist/{id}
ImportListApi ApiV3ImportlistIdPut Put /api/v3/importlist/{id}
ImportListApi ApiV3ImportlistPost Post /api/v3/importlist
ImportListApi ApiV3ImportlistSchemaGet Get /api/v3/importlist/schema
ImportListApi ApiV3ImportlistTestPost Post /api/v3/importlist/test
ImportListApi ApiV3ImportlistTestallPost Post /api/v3/importlist/testall
ImportListExclusionApi ApiV3ImportlistexclusionGet Get /api/v3/importlistexclusion
ImportListExclusionApi ApiV3ImportlistexclusionIdDelete Delete /api/v3/importlistexclusion/{id}
ImportListExclusionApi ApiV3ImportlistexclusionIdGet Get /api/v3/importlistexclusion/{id}
ImportListExclusionApi ApiV3ImportlistexclusionIdPut Put /api/v3/importlistexclusion/{id}
ImportListExclusionApi ApiV3ImportlistexclusionPost Post /api/v3/importlistexclusion
IndexerApi ApiV3IndexerActionNamePost Post /api/v3/indexer/action/{name}
IndexerApi ApiV3IndexerGet Get /api/v3/indexer
IndexerApi ApiV3IndexerIdDelete Delete /api/v3/indexer/{id}
IndexerApi ApiV3IndexerIdGet Get /api/v3/indexer/{id}
IndexerApi ApiV3IndexerIdPut Put /api/v3/indexer/{id}
IndexerApi ApiV3IndexerPost Post /api/v3/indexer
IndexerApi ApiV3IndexerSchemaGet Get /api/v3/indexer/schema
IndexerApi ApiV3IndexerTestPost Post /api/v3/indexer/test
IndexerApi ApiV3IndexerTestallPost Post /api/v3/indexer/testall
IndexerConfigApi ApiV3ConfigIndexerGet Get /api/v3/config/indexer
IndexerConfigApi ApiV3ConfigIndexerIdGet Get /api/v3/config/indexer/{id}
IndexerConfigApi ApiV3ConfigIndexerIdPut Put /api/v3/config/indexer/{id}
InitializeJsApi InitializeJsGet Get /initialize.js
LanguageProfileApi ApiV3LanguageprofileGet Get /api/v3/languageprofile
LanguageProfileApi ApiV3LanguageprofileIdDelete Delete /api/v3/languageprofile/{id}
LanguageProfileApi ApiV3LanguageprofileIdGet Get /api/v3/languageprofile/{id}
LanguageProfileApi ApiV3LanguageprofileIdPut Put /api/v3/languageprofile/{id}
LanguageProfileApi ApiV3LanguageprofilePost Post /api/v3/languageprofile
LanguageProfileSchemaApi ApiV3LanguageprofileSchemaGet Get /api/v3/languageprofile/schema
LogApi ApiV3LogGet Get /api/v3/log
LogFileApi ApiV3LogFileFilenameGet Get /api/v3/log/file/{filename}
LogFileApi ApiV3LogFileGet Get /api/v3/log/file
ManualImportApi ApiV3ManualimportGet Get /api/v3/manualimport
ManualImportApi ApiV3ManualimportPost Post /api/v3/manualimport
MediaCoverApi ApiV3MediacoverSeriesIdFilenameGet Get /api/v3/mediacover/{seriesId}/{filename}
MediaManagementConfigApi ApiV3ConfigMediamanagementGet Get /api/v3/config/mediamanagement
MediaManagementConfigApi ApiV3ConfigMediamanagementIdGet Get /api/v3/config/mediamanagement/{id}
MediaManagementConfigApi ApiV3ConfigMediamanagementIdPut Put /api/v3/config/mediamanagement/{id}
MetadataApi ApiV3MetadataActionNamePost Post /api/v3/metadata/action/{name}
MetadataApi ApiV3MetadataGet Get /api/v3/metadata
MetadataApi ApiV3MetadataIdDelete Delete /api/v3/metadata/{id}
MetadataApi ApiV3MetadataIdGet Get /api/v3/metadata/{id}
MetadataApi ApiV3MetadataIdPut Put /api/v3/metadata/{id}
MetadataApi ApiV3MetadataPost Post /api/v3/metadata
MetadataApi ApiV3MetadataSchemaGet Get /api/v3/metadata/schema
MetadataApi ApiV3MetadataTestPost Post /api/v3/metadata/test
MetadataApi ApiV3MetadataTestallPost Post /api/v3/metadata/testall
MissingApi ApiV3WantedMissingGet Get /api/v3/wanted/missing
MissingApi ApiV3WantedMissingIdGet Get /api/v3/wanted/missing/{id}
NamingConfigApi ApiV3ConfigNamingExamplesGet Get /api/v3/config/naming/examples
NamingConfigApi ApiV3ConfigNamingGet Get /api/v3/config/naming
NamingConfigApi ApiV3ConfigNamingIdGet Get /api/v3/config/naming/{id}
NamingConfigApi ApiV3ConfigNamingIdPut Put /api/v3/config/naming/{id}
NotificationApi ApiV3NotificationActionNamePost Post /api/v3/notification/action/{name}
NotificationApi ApiV3NotificationGet Get /api/v3/notification
NotificationApi ApiV3NotificationIdDelete Delete /api/v3/notification/{id}
NotificationApi ApiV3NotificationIdGet Get /api/v3/notification/{id}
NotificationApi ApiV3NotificationIdPut Put /api/v3/notification/{id}
NotificationApi ApiV3NotificationPost Post /api/v3/notification
NotificationApi ApiV3NotificationSchemaGet Get /api/v3/notification/schema
NotificationApi ApiV3NotificationTestPost Post /api/v3/notification/test
NotificationApi ApiV3NotificationTestallPost Post /api/v3/notification/testall
ParseApi ApiV3ParseGet Get /api/v3/parse
PingApi PingGet Get /ping
QualityDefinitionApi ApiV3QualitydefinitionGet Get /api/v3/qualitydefinition
QualityDefinitionApi ApiV3QualitydefinitionIdGet Get /api/v3/qualitydefinition/{id}
QualityDefinitionApi ApiV3QualitydefinitionIdPut Put /api/v3/qualitydefinition/{id}
QualityDefinitionApi ApiV3QualitydefinitionUpdatePut Put /api/v3/qualitydefinition/update
QualityProfileApi ApiV3QualityprofileGet Get /api/v3/qualityprofile
QualityProfileApi ApiV3QualityprofileIdDelete Delete /api/v3/qualityprofile/{id}
QualityProfileApi ApiV3QualityprofileIdGet Get /api/v3/qualityprofile/{id}
QualityProfileApi ApiV3QualityprofileIdPut Put /api/v3/qualityprofile/{id}
QualityProfileApi ApiV3QualityprofilePost Post /api/v3/qualityprofile
QualityProfileSchemaApi ApiV3QualityprofileSchemaGet Get /api/v3/qualityprofile/schema
QueueApi ApiV3QueueBulkDelete Delete /api/v3/queue/bulk
QueueApi ApiV3QueueGet Get /api/v3/queue
QueueApi ApiV3QueueIdDelete Delete /api/v3/queue/{id}
QueueApi ApiV3QueueIdGet Get /api/v3/queue/{id}
QueueActionApi ApiV3QueueGrabBulkPost Post /api/v3/queue/grab/bulk
QueueActionApi ApiV3QueueGrabIdPost Post /api/v3/queue/grab/{id}
QueueDetailsApi ApiV3QueueDetailsGet Get /api/v3/queue/details
QueueDetailsApi ApiV3QueueDetailsIdGet Get /api/v3/queue/details/{id}
QueueStatusApi ApiV3QueueStatusGet Get /api/v3/queue/status
QueueStatusApi ApiV3QueueStatusIdGet Get /api/v3/queue/status/{id}
ReleaseApi ApiV3ReleaseGet Get /api/v3/release
ReleaseApi ApiV3ReleaseIdGet Get /api/v3/release/{id}
ReleaseApi ApiV3ReleasePost Post /api/v3/release
ReleaseProfileApi ApiV3ReleaseprofileGet Get /api/v3/releaseprofile
ReleaseProfileApi ApiV3ReleaseprofileIdDelete Delete /api/v3/releaseprofile/{id}
ReleaseProfileApi ApiV3ReleaseprofileIdGet Get /api/v3/releaseprofile/{id}
ReleaseProfileApi ApiV3ReleaseprofileIdPut Put /api/v3/releaseprofile/{id}
ReleaseProfileApi ApiV3ReleaseprofilePost Post /api/v3/releaseprofile
ReleasePushApi ApiV3ReleasePushIdGet Get /api/v3/release/push/{id}
ReleasePushApi ApiV3ReleasePushPost Post /api/v3/release/push
RemotePathMappingApi ApiV3RemotepathmappingGet Get /api/v3/remotepathmapping
RemotePathMappingApi ApiV3RemotepathmappingIdDelete Delete /api/v3/remotepathmapping/{id}
RemotePathMappingApi ApiV3RemotepathmappingIdGet Get /api/v3/remotepathmapping/{id}
RemotePathMappingApi ApiV3RemotepathmappingIdPut Put /api/v3/remotepathmapping/{id}
RemotePathMappingApi ApiV3RemotepathmappingPost Post /api/v3/remotepathmapping
RenameEpisodeApi ApiV3RenameGet Get /api/v3/rename
RootFolderApi ApiV3RootfolderGet Get /api/v3/rootfolder
RootFolderApi ApiV3RootfolderIdDelete Delete /api/v3/rootfolder/{id}
RootFolderApi ApiV3RootfolderIdGet Get /api/v3/rootfolder/{id}
RootFolderApi ApiV3RootfolderPost Post /api/v3/rootfolder
SeasonPassApi ApiV3SeasonpassPost Post /api/v3/seasonpass
SeriesApi ApiV3SeriesGet Get /api/v3/series
SeriesApi ApiV3SeriesIdDelete Delete /api/v3/series/{id}
SeriesApi ApiV3SeriesIdGet Get /api/v3/series/{id}
SeriesApi ApiV3SeriesIdPut Put /api/v3/series/{id}
SeriesApi ApiV3SeriesPost Post /api/v3/series
SeriesEditorApi ApiV3SeriesEditorDelete Delete /api/v3/series/editor
SeriesEditorApi ApiV3SeriesEditorPut Put /api/v3/series/editor
SeriesImportApi ApiV3SeriesImportPost Post /api/v3/series/import
SeriesLookupApi ApiV3SeriesLookupGet Get /api/v3/series/lookup
StaticResourceApi ContentPathGet Get /content/{path}
StaticResourceApi LoginGet Get /login
StaticResourceApi PathGet Get /{path}
StaticResourceApi RootGet Get /
SystemApi ApiV3SystemRestartPost Post /api/v3/system/restart
SystemApi ApiV3SystemRoutesDuplicateGet Get /api/v3/system/routes/duplicate
SystemApi ApiV3SystemRoutesGet Get /api/v3/system/routes
SystemApi ApiV3SystemShutdownPost Post /api/v3/system/shutdown
SystemApi ApiV3SystemStatusGet Get /api/v3/system/status
TagApi ApiV3TagGet Get /api/v3/tag
TagApi ApiV3TagIdDelete Delete /api/v3/tag/{id}
TagApi ApiV3TagIdGet Get /api/v3/tag/{id}
TagApi ApiV3TagIdPut Put /api/v3/tag/{id}
TagApi ApiV3TagPost Post /api/v3/tag
TagDetailsApi ApiV3TagDetailGet Get /api/v3/tag/detail
TagDetailsApi ApiV3TagDetailIdGet Get /api/v3/tag/detail/{id}
TaskApi ApiV3SystemTaskGet Get /api/v3/system/task
TaskApi ApiV3SystemTaskIdGet Get /api/v3/system/task/{id}
UiConfigApi ApiV3ConfigUiGet Get /api/v3/config/ui
UiConfigApi ApiV3ConfigUiIdGet Get /api/v3/config/ui/{id}
UiConfigApi ApiV3ConfigUiIdPut Put /api/v3/config/ui/{id}
UpdateApi ApiV3UpdateGet Get /api/v3/update
UpdateLogFileApi ApiV3LogFileUpdateFilenameGet Get /api/v3/log/file/update/{filename}
UpdateLogFileApi ApiV3LogFileUpdateGet Get /api/v3/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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages