Skip to content

Latest commit

 

History

History
340 lines (215 loc) · 8.78 KB

CustomFilterAPI.md

File metadata and controls

340 lines (215 loc) · 8.78 KB

\CustomFilterAPI

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

Method HTTP request Description
CreateCustomFilter Post /api/v3/customfilter
DeleteCustomFilter Delete /api/v3/customfilter/{id}
GetCustomFilterById Get /api/v3/customfilter/{id}
ListCustomFilter Get /api/v3/customfilter
UpdateCustomFilter Put /api/v3/customfilter/{id}

CreateCustomFilter

CustomFilterResource CreateCustomFilter(ctx).CustomFilterResource(customFilterResource).Execute()

Example

package main

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

func main() {
	customFilterResource := *sonarrClient.NewCustomFilterResource() // CustomFilterResource |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
customFilterResource CustomFilterResource

Return type

CustomFilterResource

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]

DeleteCustomFilter

DeleteCustomFilter(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.CustomFilterAPI.DeleteCustomFilter(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CustomFilterAPI.DeleteCustomFilter``: %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 apiDeleteCustomFilterRequest 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]

GetCustomFilterById

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

Name Type Description Notes

Return type

CustomFilterResource

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]

ListCustomFilter

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]CustomFilterResource

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]

UpdateCustomFilter

CustomFilterResource UpdateCustomFilter(ctx, id).CustomFilterResource(customFilterResource).Execute()

Example

package main

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

func main() {
	id := "id_example" // string | 
	customFilterResource := *sonarrClient.NewCustomFilterResource() // CustomFilterResource |  (optional)

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

Name Type Description Notes

customFilterResource | CustomFilterResource | |

Return type

CustomFilterResource

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]