Skip to content

Latest commit

 

History

History
137 lines (86 loc) · 3.26 KB

LanguageAPI.md

File metadata and controls

137 lines (86 loc) · 3.26 KB

\LanguageAPI

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

Method HTTP request Description
GetLanguageById Get /api/v3/language/{id}
ListLanguage Get /api/v3/language

GetLanguageById

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

Name Type Description Notes

Return type

LanguageResource

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]

ListLanguage

[]LanguageResource ListLanguage(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.LanguageAPI.ListLanguage(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `LanguageAPI.ListLanguage``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListLanguage`: []LanguageResource
	fmt.Fprintf(os.Stdout, "Response from `LanguageAPI.ListLanguage`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]LanguageResource

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]