Skip to content

Latest commit

 

History

History
197 lines (124 loc) · 4.87 KB

LocalizationAPI.md

File metadata and controls

197 lines (124 loc) · 4.87 KB

\LocalizationAPI

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

Method HTTP request Description
GetLocalization Get /api/v3/localization
GetLocalizationById Get /api/v3/localization/{id}
GetLocalizationLanguage Get /api/v3/localization/language

GetLocalization

LocalizationResource GetLocalization(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

LocalizationResource

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]

GetLocalizationById

LocalizationResource GetLocalizationById(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {
	id := int32(56) // int32 | 

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

Name Type Description Notes

Return type

LocalizationResource

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]

GetLocalizationLanguage

LocalizationLanguageResource GetLocalizationLanguage(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

LocalizationLanguageResource

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]