Categorygithub.com/devopsarr/readarr-go
repository
1.0.0
Repository: https://github.com/devopsarr/readarr-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go API client for readarr

Readarr 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: v0.3.18.2411
  • 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/net/context

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

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

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 readarr.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), readarr.ContextServerIndex, 1)

Templated Server URL

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

ctx := context.WithValue(context.Background(), readarr.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 readarr.ContextOperationServerIndices and readarr.ContextOperationServerVariables context maps.

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

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
ApiInfoAPIGetApiGet /api
AuthenticationAPICreateLoginPost /login
AuthenticationAPIGetLogoutGet /logout
AuthorAPICreateAuthorPost /api/v1/author
AuthorAPIDeleteAuthorDelete /api/v1/author/{id}
AuthorAPIGetAuthorByIdGet /api/v1/author/{id}
AuthorAPIListAuthorGet /api/v1/author
AuthorAPIUpdateAuthorPut /api/v1/author/{id}
AuthorEditorAPIDeleteAuthorEditorDelete /api/v1/author/editor
AuthorEditorAPIPutAuthorEditorPut /api/v1/author/editor
AuthorLookupAPIGetAuthorLookupGet /api/v1/author/lookup
BackupAPICreateSystemBackupRestoreByIdPost /api/v1/system/backup/restore/{id}
BackupAPICreateSystemBackupRestoreUploadPost /api/v1/system/backup/restore/upload
BackupAPIDeleteSystemBackupDelete /api/v1/system/backup/{id}
BackupAPIListSystemBackupGet /api/v1/system/backup
BlocklistAPIDeleteBlocklistDelete /api/v1/blocklist/{id}
BlocklistAPIDeleteBlocklistBulkDelete /api/v1/blocklist/bulk
BlocklistAPIGetBlocklistGet /api/v1/blocklist
BookAPICreateBookPost /api/v1/book
BookAPIDeleteBookDelete /api/v1/book/{id}
BookAPIGetBookByIdGet /api/v1/book/{id}
BookAPIGetBookOverviewGet /api/v1/book/{id}/overview
BookAPIListBookGet /api/v1/book
BookAPIPutBookMonitorPut /api/v1/book/monitor
BookAPIUpdateBookPut /api/v1/book/{id}
BookEditorAPIDeleteBookEditorDelete /api/v1/book/editor
BookEditorAPIPutBookEditorPut /api/v1/book/editor
BookFileAPIDeleteBookFileDelete /api/v1/bookfile/{id}
BookFileAPIDeleteBookFileBulkDelete /api/v1/bookfile/bulk
BookFileAPIGetBookFileByIdGet /api/v1/bookfile/{id}
BookFileAPIListBookFileGet /api/v1/bookfile
BookFileAPIPutBookFileEditorPut /api/v1/bookfile/editor
BookFileAPIUpdateBookFilePut /api/v1/bookfile/{id}
BookLookupAPIGetBookLookupGet /api/v1/book/lookup
BookshelfAPICreateBookshelfPost /api/v1/bookshelf
CalendarAPIGetCalendarByIdGet /api/v1/calendar/{id}
CalendarAPIListCalendarGet /api/v1/calendar
CalendarFeedAPIGetFeedV1CalendarReadarrIcsGet /feed/v1/calendar/readarr.ics
CommandAPICreateCommandPost /api/v1/command
CommandAPIDeleteCommandDelete /api/v1/command/{id}
CommandAPIGetCommandByIdGet /api/v1/command/{id}
CommandAPIListCommandGet /api/v1/command
CustomFilterAPICreateCustomFilterPost /api/v1/customfilter
CustomFilterAPIDeleteCustomFilterDelete /api/v1/customfilter/{id}
CustomFilterAPIGetCustomFilterByIdGet /api/v1/customfilter/{id}
CustomFilterAPIListCustomFilterGet /api/v1/customfilter
CustomFilterAPIUpdateCustomFilterPut /api/v1/customfilter/{id}
CustomFormatAPICreateCustomFormatPost /api/v1/customformat
CustomFormatAPIDeleteCustomFormatDelete /api/v1/customformat/{id}
CustomFormatAPIGetCustomFormatByIdGet /api/v1/customformat/{id}
CustomFormatAPIGetCustomFormatSchemaGet /api/v1/customformat/schema
CustomFormatAPIListCustomFormatGet /api/v1/customformat
CustomFormatAPIUpdateCustomFormatPut /api/v1/customformat/{id}
CutoffAPIGetWantedCutoffGet /api/v1/wanted/cutoff
CutoffAPIGetWantedCutoffByIdGet /api/v1/wanted/cutoff/{id}
DelayProfileAPICreateDelayProfilePost /api/v1/delayprofile
DelayProfileAPIDeleteDelayProfileDelete /api/v1/delayprofile/{id}
DelayProfileAPIGetDelayProfileByIdGet /api/v1/delayprofile/{id}
DelayProfileAPIListDelayProfileGet /api/v1/delayprofile
DelayProfileAPIUpdateDelayProfilePut /api/v1/delayprofile/{id}
DelayProfileAPIUpdateDelayProfileReorderPut /api/v1/delayprofile/reorder/{id}
DevelopmentConfigAPIGetDevelopmentConfigGet /api/v1/config/development
DevelopmentConfigAPIGetDevelopmentConfigByIdGet /api/v1/config/development/{id}
DevelopmentConfigAPIUpdateDevelopmentConfigPut /api/v1/config/development/{id}
DiskSpaceAPIListDiskSpaceGet /api/v1/diskspace
DownloadClientAPICreateDownloadClientPost /api/v1/downloadclient
DownloadClientAPICreateDownloadClientActionByNamePost /api/v1/downloadclient/action/{name}
DownloadClientAPIDeleteDownloadClientDelete /api/v1/downloadclient/{id}
DownloadClientAPIDeleteDownloadClientBulkDelete /api/v1/downloadclient/bulk
DownloadClientAPIGetDownloadClientByIdGet /api/v1/downloadclient/{id}
DownloadClientAPIListDownloadClientGet /api/v1/downloadclient
DownloadClientAPIListDownloadClientSchemaGet /api/v1/downloadclient/schema
DownloadClientAPIPutDownloadClientBulkPut /api/v1/downloadclient/bulk
DownloadClientAPITestDownloadClientPost /api/v1/downloadclient/test
DownloadClientAPITestallDownloadClientPost /api/v1/downloadclient/testall
DownloadClientAPIUpdateDownloadClientPut /api/v1/downloadclient/{id}
DownloadClientConfigAPIGetDownloadClientConfigGet /api/v1/config/downloadclient
DownloadClientConfigAPIGetDownloadClientConfigByIdGet /api/v1/config/downloadclient/{id}
DownloadClientConfigAPIUpdateDownloadClientConfigPut /api/v1/config/downloadclient/{id}
EditionAPIListEditionGet /api/v1/edition
FileSystemAPIGetFileSystemGet /api/v1/filesystem
FileSystemAPIGetFileSystemMediafilesGet /api/v1/filesystem/mediafiles
FileSystemAPIGetFileSystemTypeGet /api/v1/filesystem/type
HealthAPIListHealthGet /api/v1/health
HistoryAPICreateHistoryFailedByIdPost /api/v1/history/failed/{id}
HistoryAPIGetHistoryGet /api/v1/history
HistoryAPIListHistoryAuthorGet /api/v1/history/author
HistoryAPIListHistorySinceGet /api/v1/history/since
HostConfigAPIGetHostConfigGet /api/v1/config/host
HostConfigAPIGetHostConfigByIdGet /api/v1/config/host/{id}
HostConfigAPIUpdateHostConfigPut /api/v1/config/host/{id}
ImportListAPICreateImportListPost /api/v1/importlist
ImportListAPICreateImportListActionByNamePost /api/v1/importlist/action/{name}
ImportListAPIDeleteImportListDelete /api/v1/importlist/{id}
ImportListAPIDeleteImportListBulkDelete /api/v1/importlist/bulk
ImportListAPIGetImportListByIdGet /api/v1/importlist/{id}
ImportListAPIListImportListGet /api/v1/importlist
ImportListAPIListImportListSchemaGet /api/v1/importlist/schema
ImportListAPIPutImportListBulkPut /api/v1/importlist/bulk
ImportListAPITestImportListPost /api/v1/importlist/test
ImportListAPITestallImportListPost /api/v1/importlist/testall
ImportListAPIUpdateImportListPut /api/v1/importlist/{id}
ImportListExclusionAPICreateImportListExclusionPost /api/v1/importlistexclusion
ImportListExclusionAPIDeleteImportListExclusionDelete /api/v1/importlistexclusion/{id}
ImportListExclusionAPIGetImportListExclusionByIdGet /api/v1/importlistexclusion/{id}
ImportListExclusionAPIListImportListExclusionGet /api/v1/importlistexclusion
ImportListExclusionAPIUpdateImportListExclusionPut /api/v1/importlistexclusion/{id}
IndexerAPICreateIndexerPost /api/v1/indexer
IndexerAPICreateIndexerActionByNamePost /api/v1/indexer/action/{name}
IndexerAPIDeleteIndexerDelete /api/v1/indexer/{id}
IndexerAPIDeleteIndexerBulkDelete /api/v1/indexer/bulk
IndexerAPIGetIndexerByIdGet /api/v1/indexer/{id}
IndexerAPIListIndexerGet /api/v1/indexer
IndexerAPIListIndexerSchemaGet /api/v1/indexer/schema
IndexerAPIPutIndexerBulkPut /api/v1/indexer/bulk
IndexerAPITestIndexerPost /api/v1/indexer/test
IndexerAPITestallIndexerPost /api/v1/indexer/testall
IndexerAPIUpdateIndexerPut /api/v1/indexer/{id}
IndexerConfigAPIGetIndexerConfigGet /api/v1/config/indexer
IndexerConfigAPIGetIndexerConfigByIdGet /api/v1/config/indexer/{id}
IndexerConfigAPIUpdateIndexerConfigPut /api/v1/config/indexer/{id}
LanguageAPIGetLanguageByIdGet /api/v1/language/{id}
LanguageAPIListLanguageGet /api/v1/language
LocalizationAPIGetLocalizationGet /api/v1/localization
LogAPIGetLogGet /api/v1/log
LogFileAPIGetLogFileByFilenameGet /api/v1/log/file/{filename}
LogFileAPIListLogFileGet /api/v1/log/file
ManualImportAPICreateManualImportPost /api/v1/manualimport
ManualImportAPIListManualImportGet /api/v1/manualimport
MediaCoverAPIGetMediaCoverAuthorByFilenameGet /api/v1/mediacover/author/{authorId}/{filename}
MediaCoverAPIGetMediaCoverBookByFilenameGet /api/v1/mediacover/book/{bookId}/{filename}
MediaManagementConfigAPIGetMediaManagementConfigGet /api/v1/config/mediamanagement
MediaManagementConfigAPIGetMediaManagementConfigByIdGet /api/v1/config/mediamanagement/{id}
MediaManagementConfigAPIUpdateMediaManagementConfigPut /api/v1/config/mediamanagement/{id}
MetadataAPICreateMetadataPost /api/v1/metadata
MetadataAPICreateMetadataActionByNamePost /api/v1/metadata/action/{name}
MetadataAPIDeleteMetadataDelete /api/v1/metadata/{id}
MetadataAPIGetMetadataByIdGet /api/v1/metadata/{id}
MetadataAPIListMetadataGet /api/v1/metadata
MetadataAPIListMetadataSchemaGet /api/v1/metadata/schema
MetadataAPITestMetadataPost /api/v1/metadata/test
MetadataAPITestallMetadataPost /api/v1/metadata/testall
MetadataAPIUpdateMetadataPut /api/v1/metadata/{id}
MetadataProfileAPICreateMetadataProfilePost /api/v1/metadataprofile
MetadataProfileAPIDeleteMetadataProfileDelete /api/v1/metadataprofile/{id}
MetadataProfileAPIGetMetadataProfileByIdGet /api/v1/metadataprofile/{id}
MetadataProfileAPIListMetadataProfileGet /api/v1/metadataprofile
MetadataProfileAPIUpdateMetadataProfilePut /api/v1/metadataprofile/{id}
MetadataProfileSchemaAPIGetMetadataprofileSchemaGet /api/v1/metadataprofile/schema
MetadataProviderConfigAPIGetMetadataProviderConfigGet /api/v1/config/metadataprovider
MetadataProviderConfigAPIGetMetadataProviderConfigByIdGet /api/v1/config/metadataprovider/{id}
MetadataProviderConfigAPIUpdateMetadataProviderConfigPut /api/v1/config/metadataprovider/{id}
MissingAPIGetWantedMissingGet /api/v1/wanted/missing
MissingAPIGetWantedMissingByIdGet /api/v1/wanted/missing/{id}
NamingConfigAPIGetNamingConfigGet /api/v1/config/naming
NamingConfigAPIGetNamingConfigByIdGet /api/v1/config/naming/{id}
NamingConfigAPIGetNamingConfigExamplesGet /api/v1/config/naming/examples
NamingConfigAPIUpdateNamingConfigPut /api/v1/config/naming/{id}
NotificationAPICreateNotificationPost /api/v1/notification
NotificationAPICreateNotificationActionByNamePost /api/v1/notification/action/{name}
NotificationAPIDeleteNotificationDelete /api/v1/notification/{id}
NotificationAPIGetNotificationByIdGet /api/v1/notification/{id}
NotificationAPIListNotificationGet /api/v1/notification
NotificationAPIListNotificationSchemaGet /api/v1/notification/schema
NotificationAPITestNotificationPost /api/v1/notification/test
NotificationAPITestallNotificationPost /api/v1/notification/testall
NotificationAPIUpdateNotificationPut /api/v1/notification/{id}
ParseAPIGetParseGet /api/v1/parse
PingAPIGetPingGet /ping
QualityDefinitionAPIGetQualityDefinitionByIdGet /api/v1/qualitydefinition/{id}
QualityDefinitionAPIListQualityDefinitionGet /api/v1/qualitydefinition
QualityDefinitionAPIPutQualityDefinitionUpdatePut /api/v1/qualitydefinition/update
QualityDefinitionAPIUpdateQualityDefinitionPut /api/v1/qualitydefinition/{id}
QualityProfileAPICreateQualityProfilePost /api/v1/qualityprofile
QualityProfileAPIDeleteQualityProfileDelete /api/v1/qualityprofile/{id}
QualityProfileAPIGetQualityProfileByIdGet /api/v1/qualityprofile/{id}
QualityProfileAPIListQualityProfileGet /api/v1/qualityprofile
QualityProfileAPIUpdateQualityProfilePut /api/v1/qualityprofile/{id}
QualityProfileSchemaAPIGetQualityprofileSchemaGet /api/v1/qualityprofile/schema
QueueAPIDeleteQueueDelete /api/v1/queue/{id}
QueueAPIDeleteQueueBulkDelete /api/v1/queue/bulk
QueueAPIGetQueueGet /api/v1/queue
QueueActionAPICreateQueueGrabBulkPost /api/v1/queue/grab/bulk
QueueActionAPICreateQueueGrabByIdPost /api/v1/queue/grab/{id}
QueueDetailsAPIListQueueDetailsGet /api/v1/queue/details
QueueStatusAPIGetQueueStatusGet /api/v1/queue/status
ReleaseAPICreateReleasePost /api/v1/release
ReleaseAPIListReleaseGet /api/v1/release
ReleaseProfileAPICreateReleaseProfilePost /api/v1/releaseprofile
ReleaseProfileAPIDeleteReleaseProfileDelete /api/v1/releaseprofile/{id}
ReleaseProfileAPIGetReleaseProfileByIdGet /api/v1/releaseprofile/{id}
ReleaseProfileAPIListReleaseProfileGet /api/v1/releaseprofile
ReleaseProfileAPIUpdateReleaseProfilePut /api/v1/releaseprofile/{id}
ReleasePushAPICreateReleasePushPost /api/v1/release/push
RemotePathMappingAPICreateRemotePathMappingPost /api/v1/remotepathmapping
RemotePathMappingAPIDeleteRemotePathMappingDelete /api/v1/remotepathmapping/{id}
RemotePathMappingAPIGetRemotePathMappingByIdGet /api/v1/remotepathmapping/{id}
RemotePathMappingAPIListRemotePathMappingGet /api/v1/remotepathmapping
RemotePathMappingAPIUpdateRemotePathMappingPut /api/v1/remotepathmapping/{id}
RenameBookAPIListRenameGet /api/v1/rename
RetagBookAPIListRetagGet /api/v1/retag
RootFolderAPICreateRootFolderPost /api/v1/rootfolder
RootFolderAPIDeleteRootFolderDelete /api/v1/rootfolder/{id}
RootFolderAPIGetRootFolderByIdGet /api/v1/rootfolder/{id}
RootFolderAPIListRootFolderGet /api/v1/rootfolder
RootFolderAPIUpdateRootFolderPut /api/v1/rootfolder/{id}
SearchAPIGetSearchGet /api/v1/search
SeriesAPIListSeriesGet /api/v1/series
StaticResourceAPIGetGet /
StaticResourceAPIGetByPathGet /{path}
StaticResourceAPIGetContentByPathGet /content/{path}
StaticResourceAPIGetLoginGet /login
SystemAPICreateSystemRestartPost /api/v1/system/restart
SystemAPICreateSystemShutdownPost /api/v1/system/shutdown
SystemAPIGetSystemRoutesGet /api/v1/system/routes
SystemAPIGetSystemRoutesDuplicateGet /api/v1/system/routes/duplicate
SystemAPIGetSystemStatusGet /api/v1/system/status
TagAPICreateTagPost /api/v1/tag
TagAPIDeleteTagDelete /api/v1/tag/{id}
TagAPIGetTagByIdGet /api/v1/tag/{id}
TagAPIListTagGet /api/v1/tag
TagAPIUpdateTagPut /api/v1/tag/{id}
TagDetailsAPIGetTagDetailByIdGet /api/v1/tag/detail/{id}
TagDetailsAPIListTagDetailGet /api/v1/tag/detail
TaskAPIGetSystemTaskByIdGet /api/v1/system/task/{id}
TaskAPIListSystemTaskGet /api/v1/system/task
UiConfigAPIGetUiConfigGet /api/v1/config/ui
UiConfigAPIGetUiConfigByIdGet /api/v1/config/ui/{id}
UiConfigAPIUpdateUiConfigPut /api/v1/config/ui/{id}
UpdateAPIListUpdateGet /api/v1/update
UpdateLogFileAPIGetLogFileUpdateByFilenameGet /api/v1/log/file/update/{filename}
UpdateLogFileAPIListLogFileUpdateGet /api/v1/log/file/update

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

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.

Example

auth := context.WithValue(
		context.Background(),
		readarr.ContextAPIKeys,
		map[string]readarr.APIKey{
			"X-Api-Key": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

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.

Example

auth := context.WithValue(
		context.Background(),
		readarr.ContextAPIKeys,
		map[string]readarr.APIKey{
			"apikey": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

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