All URIs are relative to http://localhost:8989
Method | HTTP request | Description |
---|---|---|
CreateTag | Post /api/v3/tag | |
DeleteTag | Delete /api/v3/tag/{id} | |
GetTagById | Get /api/v3/tag/{id} | |
ListTag | Get /api/v3/tag | |
UpdateTag | Put /api/v3/tag/{id} |
TagResource CreateTag(ctx).TagResource(tagResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
tagResource := *sonarrClient.NewTagResource() // TagResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.CreateTag(context.Background()).TagResource(tagResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.CreateTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateTag`: TagResource
fmt.Fprintf(os.Stdout, "Response from `TagAPI.CreateTag`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
tagResource | TagResource |
- 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]
DeleteTag(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)
r, err := apiClient.TagAPI.DeleteTag(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.DeleteTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
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 apiDeleteTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TagResource GetTagById(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.TagAPI.GetTagById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.GetTagById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTagById`: TagResource
fmt.Fprintf(os.Stdout, "Response from `TagAPI.GetTagById`: %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 apiGetTagByIdRequest 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]
[]TagResource ListTag(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.TagAPI.ListTag(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.ListTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTag`: []TagResource
fmt.Fprintf(os.Stdout, "Response from `TagAPI.ListTag`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListTagRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TagResource UpdateTag(ctx, id).TagResource(tagResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
id := "id_example" // string |
tagResource := *sonarrClient.NewTagResource() // TagResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.UpdateTag(context.Background(), id).TagResource(tagResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.UpdateTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateTag`: TagResource
fmt.Fprintf(os.Stdout, "Response from `TagAPI.UpdateTag`: %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 apiUpdateTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
tagResource | TagResource | |
- 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]