Skip to content

Latest commit

 

History

History
351 lines (224 loc) · 8.85 KB

File metadata and controls

351 lines (224 loc) · 8.85 KB

\ArtistAPI

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}

CreateArtist

ArtistResource CreateArtist(ctx).ArtistResource(artistResource).Execute()

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateArtistRequest struct via the builder pattern

Name Type Description Notes
artistResource ArtistResource

Return type

ArtistResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteArtist

DeleteArtist(ctx, id).DeleteFiles(deleteFiles).AddImportListExclusion(addImportListExclusion).Execute()

Example

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)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32

Other Parameters

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]

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetArtistById

ArtistResource GetArtistById(ctx, id).Execute()

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id int32

Other Parameters

Other parameters are passed through a pointer to a apiGetArtistByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

ArtistResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • 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]

ListArtist

[]ArtistResource ListArtist(ctx).MbId(mbId).Execute()

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListArtistRequest struct via the builder pattern

Name Type Description Notes
mbId string

Return type

[]ArtistResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateArtist

ArtistResource UpdateArtist(ctx, id).MoveFiles(moveFiles).ArtistResource(artistResource).Execute()

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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 | |

Return type

ArtistResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]