Skip to content

Latest commit

 

History

History
208 lines (132 loc) · 5.5 KB

IndexerConfigAPI.md

File metadata and controls

208 lines (132 loc) · 5.5 KB

\IndexerConfigAPI

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

Method HTTP request Description
GetIndexerConfig Get /api/v3/config/indexer
GetIndexerConfigById Get /api/v3/config/indexer/{id}
UpdateIndexerConfig Put /api/v3/config/indexer/{id}

GetIndexerConfig

IndexerConfigResource GetIndexerConfig(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	radarrClient "github.com/devopsarr/radarr-go/radarr"
)

func main() {

	configuration := radarrClient.NewConfiguration()
	apiClient := radarrClient.NewAPIClient(configuration)
	resp, r, err := apiClient.IndexerConfigAPI.GetIndexerConfig(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IndexerConfigAPI.GetIndexerConfig``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetIndexerConfig`: IndexerConfigResource
	fmt.Fprintf(os.Stdout, "Response from `IndexerConfigAPI.GetIndexerConfig`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

IndexerConfigResource

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]

GetIndexerConfigById

IndexerConfigResource GetIndexerConfigById(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.IndexerConfigAPI.GetIndexerConfigById(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IndexerConfigAPI.GetIndexerConfigById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetIndexerConfigById`: IndexerConfigResource
	fmt.Fprintf(os.Stdout, "Response from `IndexerConfigAPI.GetIndexerConfigById`: %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 apiGetIndexerConfigByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

IndexerConfigResource

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]

UpdateIndexerConfig

IndexerConfigResource UpdateIndexerConfig(ctx, id).IndexerConfigResource(indexerConfigResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	radarrClient "github.com/devopsarr/radarr-go/radarr"
)

func main() {
	id := "id_example" // string | 
	indexerConfigResource := *radarrClient.NewIndexerConfigResource() // IndexerConfigResource |  (optional)

	configuration := radarrClient.NewConfiguration()
	apiClient := radarrClient.NewAPIClient(configuration)
	resp, r, err := apiClient.IndexerConfigAPI.UpdateIndexerConfig(context.Background(), id).IndexerConfigResource(indexerConfigResource).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IndexerConfigAPI.UpdateIndexerConfig``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateIndexerConfig`: IndexerConfigResource
	fmt.Fprintf(os.Stdout, "Response from `IndexerConfigAPI.UpdateIndexerConfig`: %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 apiUpdateIndexerConfigRequest struct via the builder pattern

Name Type Description Notes

indexerConfigResource | IndexerConfigResource | |

Return type

IndexerConfigResource

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]