All URIs are relative to http://localhost:8989
Method | HTTP request | Description |
---|---|---|
CreateNotification | Post /api/v3/notification | |
CreateNotificationActionByName | Post /api/v3/notification/action/{name} | |
DeleteNotification | Delete /api/v3/notification/{id} | |
GetNotificationById | Get /api/v3/notification/{id} | |
ListNotification | Get /api/v3/notification | |
ListNotificationSchema | Get /api/v3/notification/schema | |
TestNotification | Post /api/v3/notification/test | |
TestallNotification | Post /api/v3/notification/testall | |
UpdateNotification | Put /api/v3/notification/{id} |
NotificationResource CreateNotification(ctx).ForceSave(forceSave).NotificationResource(notificationResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
forceSave := true // bool | (optional) (default to false)
notificationResource := *sonarrClient.NewNotificationResource() // NotificationResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationAPI.CreateNotification(context.Background()).ForceSave(forceSave).NotificationResource(notificationResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.CreateNotification``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateNotification`: NotificationResource
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.CreateNotification`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateNotificationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
forceSave | bool | [default to false] | |
notificationResource | NotificationResource |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateNotificationActionByName(ctx, name).NotificationResource(notificationResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
name := "name_example" // string |
notificationResource := *sonarrClient.NewNotificationResource() // NotificationResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
r, err := apiClient.NotificationAPI.CreateNotificationActionByName(context.Background(), name).NotificationResource(notificationResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.CreateNotificationActionByName``: %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. | |
name | string |
Other parameters are passed through a pointer to a apiCreateNotificationActionByNameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
notificationResource | NotificationResource | |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteNotification(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.NotificationAPI.DeleteNotification(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.DeleteNotification``: %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 apiDeleteNotificationRequest 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]
NotificationResource GetNotificationById(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.NotificationAPI.GetNotificationById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.GetNotificationById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNotificationById`: NotificationResource
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.GetNotificationById`: %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 apiGetNotificationByIdRequest 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]
[]NotificationResource ListNotification(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.NotificationAPI.ListNotification(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.ListNotification``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListNotification`: []NotificationResource
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.ListNotification`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListNotificationRequest 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]
[]NotificationResource ListNotificationSchema(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.NotificationAPI.ListNotificationSchema(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.ListNotificationSchema``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListNotificationSchema`: []NotificationResource
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.ListNotificationSchema`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListNotificationSchemaRequest 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]
TestNotification(ctx).ForceTest(forceTest).NotificationResource(notificationResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
forceTest := true // bool | (optional) (default to false)
notificationResource := *sonarrClient.NewNotificationResource() // NotificationResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
r, err := apiClient.NotificationAPI.TestNotification(context.Background()).ForceTest(forceTest).NotificationResource(notificationResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.TestNotification``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiTestNotificationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
forceTest | bool | [default to false] | |
notificationResource | NotificationResource |
(empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TestallNotification(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
r, err := apiClient.NotificationAPI.TestallNotification(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.TestallNotification``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiTestallNotificationRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NotificationResource UpdateNotification(ctx, id).ForceSave(forceSave).NotificationResource(notificationResource).Execute()
package main
import (
"context"
"fmt"
"os"
sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)
func main() {
id := int32(56) // int32 |
forceSave := true // bool | (optional) (default to false)
notificationResource := *sonarrClient.NewNotificationResource() // NotificationResource | (optional)
configuration := sonarrClient.NewConfiguration()
apiClient := sonarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationAPI.UpdateNotification(context.Background(), id).ForceSave(forceSave).NotificationResource(notificationResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.UpdateNotification``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateNotification`: NotificationResource
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.UpdateNotification`: %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 apiUpdateNotificationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
forceSave | bool | | [default to false] notificationResource | NotificationResource | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]