Skip to content

Latest commit

 

History

History
276 lines (174 loc) · 7.03 KB

CollectionAPI.md

File metadata and controls

276 lines (174 loc) · 7.03 KB

\CollectionAPI

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}

GetCollectionById

CollectionResource GetCollectionById(ctx, id).Execute()

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32

Other Parameters

Other parameters are passed through a pointer to a apiGetCollectionByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

CollectionResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • 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]

ListCollection

[]CollectionResource ListCollection(ctx).TmdbId(tmdbId).Execute()

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListCollectionRequest struct via the builder pattern

Name Type Description Notes
tmdbId int32

Return type

[]CollectionResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutCollection

PutCollection(ctx).CollectionUpdateResource(collectionUpdateResource).Execute()

Example

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)
	}
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPutCollectionRequest struct via the builder pattern

Name Type Description Notes
collectionUpdateResource CollectionUpdateResource

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateCollection

CollectionResource UpdateCollection(ctx, id).CollectionResource(collectionResource).Execute()

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

Other parameters are passed through a pointer to a apiUpdateCollectionRequest struct via the builder pattern

Name Type Description Notes

collectionResource | CollectionResource | |

Return type

CollectionResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • 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]