All URIs are relative to http://localhost:8686
| Method | HTTP request | Description |
|---|---|---|
| CreateArtist | Post /api/v1/artist | |
| DeleteArtist | Delete /api/v1/artist/{id} | |
| GetArtistById | Get /api/v1/artist/{id} | |
| ListArtist | Get /api/v1/artist | |
| UpdateArtist | Put /api/v1/artist/{id} |
ArtistResource CreateArtist(ctx).ArtistResource(artistResource).Execute()
package main
import (
"context"
"fmt"
"os"
lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)
func main() {
artistResource := *lidarrClient.NewArtistResource() // ArtistResource | (optional)
configuration := lidarrClient.NewConfiguration()
apiClient := lidarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.ArtistAPI.CreateArtist(context.Background()).ArtistResource(artistResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ArtistAPI.CreateArtist``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateArtist`: ArtistResource
fmt.Fprintf(os.Stdout, "Response from `ArtistAPI.CreateArtist`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateArtistRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| artistResource | ArtistResource |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteArtist(ctx, id).DeleteFiles(deleteFiles).AddImportListExclusion(addImportListExclusion).Execute()
package main
import (
"context"
"fmt"
"os"
lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)
func main() {
id := int32(56) // int32 |
deleteFiles := true // bool | (optional) (default to false)
addImportListExclusion := true // bool | (optional) (default to false)
configuration := lidarrClient.NewConfiguration()
apiClient := lidarrClient.NewAPIClient(configuration)
r, err := apiClient.ArtistAPI.DeleteArtist(context.Background(), id).DeleteFiles(deleteFiles).AddImportListExclusion(addImportListExclusion).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ArtistAPI.DeleteArtist``: %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 apiDeleteArtistRequest 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]
ArtistResource GetArtistById(ctx, id).Execute()
package main
import (
"context"
"fmt"
"os"
lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)
func main() {
id := int32(56) // int32 |
configuration := lidarrClient.NewConfiguration()
apiClient := lidarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.ArtistAPI.GetArtistById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ArtistAPI.GetArtistById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetArtistById`: ArtistResource
fmt.Fprintf(os.Stdout, "Response from `ArtistAPI.GetArtistById`: %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 apiGetArtistByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- 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]
[]ArtistResource ListArtist(ctx).MbId(mbId).Execute()
package main
import (
"context"
"fmt"
"os"
lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)
func main() {
mbId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional)
configuration := lidarrClient.NewConfiguration()
apiClient := lidarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.ArtistAPI.ListArtist(context.Background()).MbId(mbId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ArtistAPI.ListArtist``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListArtist`: []ArtistResource
fmt.Fprintf(os.Stdout, "Response from `ArtistAPI.ListArtist`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListArtistRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| mbId | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ArtistResource UpdateArtist(ctx, id).MoveFiles(moveFiles).ArtistResource(artistResource).Execute()
package main
import (
"context"
"fmt"
"os"
lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)
func main() {
id := "id_example" // string |
moveFiles := true // bool | (optional) (default to false)
artistResource := *lidarrClient.NewArtistResource() // ArtistResource | (optional)
configuration := lidarrClient.NewConfiguration()
apiClient := lidarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.ArtistAPI.UpdateArtist(context.Background(), id).MoveFiles(moveFiles).ArtistResource(artistResource).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ArtistAPI.UpdateArtist``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateArtist`: ArtistResource
fmt.Fprintf(os.Stdout, "Response from `ArtistAPI.UpdateArtist`: %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 apiUpdateArtistRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
moveFiles | bool | | [default to false] artistResource | ArtistResource | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]