All URIs are relative to http://localhost:8787
| Method | HTTP request | Description |
|---|---|---|
| CreateAuthor | Post /api/v1/author | |
| DeleteAuthor | Delete /api/v1/author/{id} | |
| GetAuthorById | Get /api/v1/author/{id} | |
| ListAuthor | Get /api/v1/author | |
| UpdateAuthor | Put /api/v1/author/{id} |
AuthorResource CreateAuthor(ctx).AuthorResource(authorResource).Execute()
package main
import (
"context"
"fmt"
"os"
readarrClient "github.com/devopsarr/readarr-go/readarr"
)
func main() {
authorResource := *readarrClient.NewAuthorResource() // AuthorResource | (optional)
configuration := readarrClient.NewConfiguration()
apiClient := readarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorAPI.CreateAuthor(context.Background()).AuthorResource(authorResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorAPI.CreateAuthor``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAuthor`: AuthorResource
fmt.Fprintf(os.Stdout, "Response from `AuthorAPI.CreateAuthor`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateAuthorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| authorResource | AuthorResource |
- 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]
DeleteAuthor(ctx, id).DeleteFiles(deleteFiles).AddImportListExclusion(addImportListExclusion).Execute()
package main
import (
"context"
"fmt"
"os"
readarrClient "github.com/devopsarr/readarr-go/readarr"
)
func main() {
id := int32(56) // int32 |
deleteFiles := true // bool | (optional) (default to false)
addImportListExclusion := true // bool | (optional) (default to false)
configuration := readarrClient.NewConfiguration()
apiClient := readarrClient.NewAPIClient(configuration)
r, err := apiClient.AuthorAPI.DeleteAuthor(context.Background(), id).DeleteFiles(deleteFiles).AddImportListExclusion(addImportListExclusion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorAPI.DeleteAuthor``: %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 apiDeleteAuthorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
deleteFiles | bool | | [default to false] addImportListExclusion | bool | | [default to false]
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthorResource GetAuthorById(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
readarrClient "github.com/devopsarr/readarr-go/readarr"
)
func main() {
id := int32(56) // int32 |
configuration := readarrClient.NewConfiguration()
apiClient := readarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorAPI.GetAuthorById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorAPI.GetAuthorById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAuthorById`: AuthorResource
fmt.Fprintf(os.Stdout, "Response from `AuthorAPI.GetAuthorById`: %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 apiGetAuthorByIdRequest 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]
[]AuthorResource ListAuthor(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
readarrClient "github.com/devopsarr/readarr-go/readarr"
)
func main() {
configuration := readarrClient.NewConfiguration()
apiClient := readarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorAPI.ListAuthor(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorAPI.ListAuthor``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAuthor`: []AuthorResource
fmt.Fprintf(os.Stdout, "Response from `AuthorAPI.ListAuthor`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListAuthorRequest 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]
AuthorResource UpdateAuthor(ctx, id).MoveFiles(moveFiles).AuthorResource(authorResource).Execute()
package main
import (
"context"
"fmt"
"os"
readarrClient "github.com/devopsarr/readarr-go/readarr"
)
func main() {
id := "id_example" // string |
moveFiles := true // bool | (optional) (default to false)
authorResource := *readarrClient.NewAuthorResource() // AuthorResource | (optional)
configuration := readarrClient.NewConfiguration()
apiClient := readarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthorAPI.UpdateAuthor(context.Background(), id).MoveFiles(moveFiles).AuthorResource(authorResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthorAPI.UpdateAuthor``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAuthor`: AuthorResource
fmt.Fprintf(os.Stdout, "Response from `AuthorAPI.UpdateAuthor`: %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 apiUpdateAuthorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
moveFiles | bool | | [default to false] authorResource | AuthorResource | |
- 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]