Skip to content

Latest commit

 

History

History
208 lines (132 loc) · 5.36 KB

HostConfigAPI.md

File metadata and controls

208 lines (132 loc) · 5.36 KB

\HostConfigAPI

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

Method HTTP request Description
GetHostConfig Get /api/v1/config/host
GetHostConfigById Get /api/v1/config/host/{id}
UpdateHostConfig Put /api/v1/config/host/{id}

GetHostConfig

HostConfigResource GetHostConfig(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

HostConfigResource

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]

GetHostConfigById

HostConfigResource GetHostConfigById(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)

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

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

Name Type Description Notes

Return type

HostConfigResource

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]

UpdateHostConfig

HostConfigResource UpdateHostConfig(ctx, id).HostConfigResource(hostConfigResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)

func main() {
	id := "id_example" // string | 
	hostConfigResource := *lidarrClient.NewHostConfigResource() // HostConfigResource |  (optional)

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

Name Type Description Notes

hostConfigResource | HostConfigResource | |

Return type

HostConfigResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

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