Skip to content

Latest commit

 

History

History
269 lines (169 loc) · 6.68 KB

RootFolderAPI.md

File metadata and controls

269 lines (169 loc) · 6.68 KB

\RootFolderAPI

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

Method HTTP request Description
CreateRootFolder Post /api/v3/rootfolder
DeleteRootFolder Delete /api/v3/rootfolder/{id}
GetRootFolderById Get /api/v3/rootfolder/{id}
ListRootFolder Get /api/v3/rootfolder

CreateRootFolder

RootFolderResource CreateRootFolder(ctx).RootFolderResource(rootFolderResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

func main() {
	rootFolderResource := *whisparrClient.NewRootFolderResource() // RootFolderResource |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
rootFolderResource RootFolderResource

Return type

RootFolderResource

Authorization

apikey, X-Api-Key

HTTP request headers

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

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

DeleteRootFolder

DeleteRootFolder(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

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

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

GetRootFolderById

RootFolderResource GetRootFolderById(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

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

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

Name Type Description Notes

Return type

RootFolderResource

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]

ListRootFolder

[]RootFolderResource ListRootFolder(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	whisparrClient "github.com/devopsarr/whisparr-go/whisparr"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]RootFolderResource

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]