All URIs are relative to http://localhost:7878
Method | HTTP request | Description |
---|---|---|
GetCollectionById | Get /api/v3/collection/{id} | |
ListCollection | Get /api/v3/collection | |
PutCollection | Put /api/v3/collection | |
UpdateCollection | Put /api/v3/collection/{id} |
CollectionResource GetCollectionById(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
radarrClient "github.com/devopsarr/radarr-go/radarr"
)
func main() {
id := int32(56) // int32 |
configuration := radarrClient.NewConfiguration()
apiClient := radarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.CollectionAPI.GetCollectionById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CollectionAPI.GetCollectionById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCollectionById`: CollectionResource
fmt.Fprintf(os.Stdout, "Response from `CollectionAPI.GetCollectionById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 |
Other parameters are passed through a pointer to a apiGetCollectionByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CollectionResource ListCollection(ctx).TmdbId(tmdbId).Execute()
package main
import (
"context"
"fmt"
"os"
radarrClient "github.com/devopsarr/radarr-go/radarr"
)
func main() {
tmdbId := int32(56) // int32 | (optional)
configuration := radarrClient.NewConfiguration()
apiClient := radarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.CollectionAPI.ListCollection(context.Background()).TmdbId(tmdbId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CollectionAPI.ListCollection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCollection`: []CollectionResource
fmt.Fprintf(os.Stdout, "Response from `CollectionAPI.ListCollection`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListCollectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
tmdbId | int32 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PutCollection(ctx).CollectionUpdateResource(collectionUpdateResource).Execute()
package main
import (
"context"
"fmt"
"os"
radarrClient "github.com/devopsarr/radarr-go/radarr"
)
func main() {
collectionUpdateResource := *radarrClient.NewCollectionUpdateResource() // CollectionUpdateResource | (optional)
configuration := radarrClient.NewConfiguration()
apiClient := radarrClient.NewAPIClient(configuration)
r, err := apiClient.CollectionAPI.PutCollection(context.Background()).CollectionUpdateResource(collectionUpdateResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CollectionAPI.PutCollection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiPutCollectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
collectionUpdateResource | CollectionUpdateResource |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionResource UpdateCollection(ctx, id).CollectionResource(collectionResource).Execute()
package main
import (
"context"
"fmt"
"os"
radarrClient "github.com/devopsarr/radarr-go/radarr"
)
func main() {
id := "id_example" // string |
collectionResource := *radarrClient.NewCollectionResource() // CollectionResource | (optional)
configuration := radarrClient.NewConfiguration()
apiClient := radarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.CollectionAPI.UpdateCollection(context.Background(), id).CollectionResource(collectionResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CollectionAPI.UpdateCollection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCollection`: CollectionResource
fmt.Fprintf(os.Stdout, "Response from `CollectionAPI.UpdateCollection`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiUpdateCollectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
collectionResource | CollectionResource | |
- Content-Type: application/json
- Accept: text/plain, application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]