Skip to content

Latest commit

 

History

History
137 lines (86 loc) · 3.23 KB

TaskAPI.md

File metadata and controls

137 lines (86 loc) · 3.23 KB

\TaskAPI

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

Method HTTP request Description
GetSystemTaskById Get /api/v3/system/task/{id}
ListSystemTask Get /api/v3/system/task

GetSystemTaskById

TaskResource GetSystemTaskById(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	radarrClient "github.com/devopsarr/radarr-go/radarr"
)

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

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

Name Type Description Notes

Return type

TaskResource

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]

ListSystemTask

[]TaskResource ListSystemTask(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	radarrClient "github.com/devopsarr/radarr-go/radarr"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]TaskResource

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]