Skip to content

Latest commit

 

History

History
398 lines (251 loc) · 10.1 KB

File metadata and controls

398 lines (251 loc) · 10.1 KB

\CustomFormatAPI

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

Method HTTP request Description
CreateCustomFormat Post /api/v1/customformat
DeleteCustomFormat Delete /api/v1/customformat/{id}
GetCustomFormatById Get /api/v1/customformat/{id}
GetCustomFormatSchema Get /api/v1/customformat/schema
ListCustomFormat Get /api/v1/customformat
UpdateCustomFormat Put /api/v1/customformat/{id}

CreateCustomFormat

CustomFormatResource CreateCustomFormat(ctx).CustomFormatResource(customFormatResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	readarrClient "github.com/devopsarr/readarr-go/readarr"
)

func main() {
	customFormatResource := *readarrClient.NewCustomFormatResource() // CustomFormatResource |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
customFormatResource CustomFormatResource

Return type

CustomFormatResource

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]

DeleteCustomFormat

DeleteCustomFormat(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	readarrClient "github.com/devopsarr/readarr-go/readarr"
)

func main() {
	id := int32(56) // int32 | 

	configuration := readarrClient.NewConfiguration()
	apiClient := readarrClient.NewAPIClient(configuration)
	r, err := apiClient.CustomFormatAPI.DeleteCustomFormat(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CustomFormatAPI.DeleteCustomFormat``: %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 apiDeleteCustomFormatRequest 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]

GetCustomFormatById

CustomFormatResource GetCustomFormatById(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	readarrClient "github.com/devopsarr/readarr-go/readarr"
)

func main() {
	id := int32(56) // int32 | 

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

Name Type Description Notes

Return type

CustomFormatResource

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]

GetCustomFormatSchema

GetCustomFormatSchema(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	readarrClient "github.com/devopsarr/readarr-go/readarr"
)

func main() {

	configuration := readarrClient.NewConfiguration()
	apiClient := readarrClient.NewAPIClient(configuration)
	r, err := apiClient.CustomFormatAPI.GetCustomFormatSchema(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CustomFormatAPI.GetCustomFormatSchema``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

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]

ListCustomFormat

[]CustomFormatResource ListCustomFormat(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	readarrClient "github.com/devopsarr/readarr-go/readarr"
)

func main() {

	configuration := readarrClient.NewConfiguration()
	apiClient := readarrClient.NewAPIClient(configuration)
	resp, r, err := apiClient.CustomFormatAPI.ListCustomFormat(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CustomFormatAPI.ListCustomFormat``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListCustomFormat`: []CustomFormatResource
	fmt.Fprintf(os.Stdout, "Response from `CustomFormatAPI.ListCustomFormat`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]CustomFormatResource

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]

UpdateCustomFormat

CustomFormatResource UpdateCustomFormat(ctx, id).CustomFormatResource(customFormatResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	readarrClient "github.com/devopsarr/readarr-go/readarr"
)

func main() {
	id := "id_example" // string | 
	customFormatResource := *readarrClient.NewCustomFormatResource() // CustomFormatResource |  (optional)

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

Name Type Description Notes

customFormatResource | CustomFormatResource | |

Return type

CustomFormatResource

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]