Files
plexgo/pms/docs/ButlerApi.md
2023-08-10 21:24:37 -05:00

7.2 KiB

\ButlerApi

All URIs are relative to http://10.10.10.47:32400

Method HTTP request Description
GetButlerTasks Get /butler Get Butler tasks
StartAllTasks Post /butler Start all Butler tasks
StartTask Post /butler/{taskName} Start a single Butler task
StopAllTasks Delete /butler Stop all Butler tasks
StopTask Delete /butler/{taskName} Stop a single Butler task

GetButlerTasks

GetButlerTasks200Response GetButlerTasks(ctx).Execute()

Get Butler tasks

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

GetButlerTasks200Response

Authorization

accessToken

HTTP request headers

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

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

StartAllTasks

StartAllTasks(ctx).Execute()

Start all Butler tasks

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ButlerApi.StartAllTasks(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StartAllTasks``: %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 apiStartAllTasksRequest struct via the builder pattern

Return type

(empty response body)

Authorization

accessToken

HTTP request headers

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

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

StartTask

StartTask(ctx, taskName).Execute()

Start a single Butler task

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    taskName := TODO // interface{} | the name of the task to be started.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ButlerApi.StartTask(context.Background(), taskName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StartTask``: %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.
taskName interface{} the name of the task to be started.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

accessToken

HTTP request headers

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

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

StopAllTasks

StopAllTasks(ctx).Execute()

Stop all Butler tasks

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ButlerApi.StopAllTasks(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StopAllTasks``: %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 apiStopAllTasksRequest struct via the builder pattern

Return type

(empty response body)

Authorization

accessToken

HTTP request headers

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

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

StopTask

StopTask(ctx, taskName).Execute()

Stop a single Butler task

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    taskName := TODO // interface{} | The name of the task to be started.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ButlerApi.StopTask(context.Background(), taskName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ButlerApi.StopTask``: %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.
taskName interface{} The name of the task to be started.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

accessToken

HTTP request headers

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

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