Skip to content

Latest commit

 

History

History
340 lines (215 loc) · 8.98 KB

QualityProfileAPI.md

File metadata and controls

340 lines (215 loc) · 8.98 KB

\QualityProfileAPI

All URIs are relative to http://localhost:8989

Method HTTP request Description
CreateQualityProfile Post /api/v3/qualityprofile
DeleteQualityProfile Delete /api/v3/qualityprofile/{id}
GetQualityProfileById Get /api/v3/qualityprofile/{id}
ListQualityProfile Get /api/v3/qualityprofile
UpdateQualityProfile Put /api/v3/qualityprofile/{id}

CreateQualityProfile

QualityProfileResource CreateQualityProfile(ctx).QualityProfileResource(qualityProfileResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {
	qualityProfileResource := *sonarrClient.NewQualityProfileResource() // QualityProfileResource |  (optional)

	configuration := sonarrClient.NewConfiguration()
	apiClient := sonarrClient.NewAPIClient(configuration)
	resp, r, err := apiClient.QualityProfileAPI.CreateQualityProfile(context.Background()).QualityProfileResource(qualityProfileResource).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `QualityProfileAPI.CreateQualityProfile``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateQualityProfile`: QualityProfileResource
	fmt.Fprintf(os.Stdout, "Response from `QualityProfileAPI.CreateQualityProfile`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
qualityProfileResource QualityProfileResource

Return type

QualityProfileResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain, application/json, text/json

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

DeleteQualityProfile

DeleteQualityProfile(ctx, id).Execute()

Example

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.QualityProfileAPI.DeleteQualityProfile(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `QualityProfileAPI.DeleteQualityProfile``: %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 apiDeleteQualityProfileRequest struct via the builder pattern

Name Type Description Notes

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]

GetQualityProfileById

QualityProfileResource GetQualityProfileById(ctx, id).Execute()

Example

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.QualityProfileAPI.GetQualityProfileById(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `QualityProfileAPI.GetQualityProfileById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetQualityProfileById`: QualityProfileResource
	fmt.Fprintf(os.Stdout, "Response from `QualityProfileAPI.GetQualityProfileById`: %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 apiGetQualityProfileByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

QualityProfileResource

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]

ListQualityProfile

[]QualityProfileResource ListQualityProfile(ctx).Execute()

Example

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.QualityProfileAPI.ListQualityProfile(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `QualityProfileAPI.ListQualityProfile``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListQualityProfile`: []QualityProfileResource
	fmt.Fprintf(os.Stdout, "Response from `QualityProfileAPI.ListQualityProfile`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]QualityProfileResource

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]

UpdateQualityProfile

QualityProfileResource UpdateQualityProfile(ctx, id).QualityProfileResource(qualityProfileResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {
	id := "id_example" // string | 
	qualityProfileResource := *sonarrClient.NewQualityProfileResource() // QualityProfileResource |  (optional)

	configuration := sonarrClient.NewConfiguration()
	apiClient := sonarrClient.NewAPIClient(configuration)
	resp, r, err := apiClient.QualityProfileAPI.UpdateQualityProfile(context.Background(), id).QualityProfileResource(qualityProfileResource).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `QualityProfileAPI.UpdateQualityProfile``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `UpdateQualityProfile`: QualityProfileResource
	fmt.Fprintf(os.Stdout, "Response from `QualityProfileAPI.UpdateQualityProfile`: %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 apiUpdateQualityProfileRequest struct via the builder pattern

Name Type Description Notes

qualityProfileResource | QualityProfileResource | |

Return type

QualityProfileResource

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain, application/json, text/json

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