All URIs are relative to http://localhost:8989
Method | HTTP request | Description |
---|---|---|
GetHostConfig | Get /api/v3/config/host | |
GetHostConfigById | Get /api/v3/config/host/{id} | |
UpdateHostConfig | Put /api/v3/config/host/{id} |
HostConfigResource GetHostConfig(ctx).Execute()
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.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)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetHostConfigRequest struct via the builder pattern
- 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]
HostConfigResource GetHostConfigById(ctx, id).Execute()
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.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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 |
Other parameters are passed through a pointer to a apiGetHostConfigByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HostConfigResource UpdateHostConfig(ctx, id).HostConfigResource(hostConfigResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
id := "id_example" // string |
hostConfigResource := *sonarrClient.NewHostConfigResource() // HostConfigResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiUpdateHostConfigRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
hostConfigResource | HostConfigResource | |
- 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]