All URIs are relative to http://localhost:8686
| Method | HTTP request | Description |
|---|---|---|
| GetTrackById | Get /api/v1/track/{id} | |
| ListTrack | Get /api/v1/track |
TrackResource GetTrackById(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.TrackAPI.GetTrackById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrackAPI.GetTrackById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTrackById`: TrackResource
fmt.Fprintf(os.Stdout, "Response from `TrackAPI.GetTrackById`: %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 apiGetTrackByIdRequest 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]
[]TrackResource ListTrack(ctx).ArtistId(artistId).AlbumId(albumId).AlbumReleaseId(albumReleaseId).TrackIds(trackIds).Execute()
package main
import (
"context"
"fmt"
"os"
lidarrClient "github.com/devopsarr/lidarr-go/lidarr"
)
func main() {
artistId := int32(56) // int32 | (optional)
albumId := int32(56) // int32 | (optional)
albumReleaseId := int32(56) // int32 | (optional)
trackIds := []int32{int32(123)} // []int32 | (optional)
configuration := lidarrClient.NewConfiguration()
apiClient := lidarrClient.NewAPIClient(configuration)
resp, r, err := apiClient.TrackAPI.ListTrack(context.Background()).ArtistId(artistId).AlbumId(albumId).AlbumReleaseId(albumReleaseId).TrackIds(trackIds).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrackAPI.ListTrack``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTrack`: []TrackResource
fmt.Fprintf(os.Stdout, "Response from `TrackAPI.ListTrack`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListTrackRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| artistId | int32 | ||
| albumId | int32 | ||
| albumReleaseId | int32 | ||
| trackIds | []int32 |
- 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]