All URIs are relative to http://localhost:8989
Method | HTTP request | Description |
---|---|---|
CreateCustomFilter | Post /api/v3/customfilter | |
DeleteCustomFilter | Delete /api/v3/customfilter/{id} | |
GetCustomFilterById | Get /api/v3/customfilter/{id} | |
ListCustomFilter | Get /api/v3/customfilter | |
UpdateCustomFilter | Put /api/v3/customfilter/{id} |
CustomFilterResource CreateCustomFilter(ctx).CustomFilterResource(customFilterResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
customFilterResource := *sonarrClient.NewCustomFilterResource() // CustomFilterResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomFilterAPI.CreateCustomFilter(context.Background()).CustomFilterResource(customFilterResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomFilterAPI.CreateCustomFilter``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCustomFilter`: CustomFilterResource
fmt.Fprintf(os.Stdout, "Response from `CustomFilterAPI.CreateCustomFilter`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateCustomFilterRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
customFilterResource | CustomFilterResource |
- 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]
DeleteCustomFilter(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.CustomFilterAPI.DeleteCustomFilter(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomFilterAPI.DeleteCustomFilter``: %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 apiDeleteCustomFilterRequest 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]
CustomFilterResource GetCustomFilterById(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.CustomFilterAPI.GetCustomFilterById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomFilterAPI.GetCustomFilterById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCustomFilterById`: CustomFilterResource
fmt.Fprintf(os.Stdout, "Response from `CustomFilterAPI.GetCustomFilterById`: %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 apiGetCustomFilterByIdRequest 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]
[]CustomFilterResource ListCustomFilter(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.CustomFilterAPI.ListCustomFilter(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomFilterAPI.ListCustomFilter``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCustomFilter`: []CustomFilterResource
fmt.Fprintf(os.Stdout, "Response from `CustomFilterAPI.ListCustomFilter`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListCustomFilterRequest 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]
CustomFilterResource UpdateCustomFilter(ctx, id).CustomFilterResource(customFilterResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
id := "id_example" // string |
customFilterResource := *sonarrClient.NewCustomFilterResource() // CustomFilterResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.CustomFilterAPI.UpdateCustomFilter(context.Background(), id).CustomFilterResource(customFilterResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CustomFilterAPI.UpdateCustomFilter``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCustomFilter`: CustomFilterResource
fmt.Fprintf(os.Stdout, "Response from `CustomFilterAPI.UpdateCustomFilter`: %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 apiUpdateCustomFilterRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
customFilterResource | CustomFilterResource | |
- 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]