Skip to content

Latest commit

 

History

History
205 lines (128 loc) · 4.85 KB

ReleaseAPI.md

File metadata and controls

205 lines (128 loc) · 4.85 KB

\ReleaseAPI

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

Method HTTP request Description
CreateRelease Post /api/v3/release
GetReleaseById Get /api/v3/release/{id}
ListRelease Get /api/v3/release

CreateRelease

CreateRelease(ctx).ReleaseResource(releaseResource).Execute()

Example

package main

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

func main() {
	releaseResource := *whisparrClient.NewReleaseResource() // ReleaseResource |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
releaseResource ReleaseResource

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

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

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

GetReleaseById

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

Name Type Description Notes

Return type

ReleaseResource

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]

ListRelease

[]ReleaseResource ListRelease(ctx).MovieId(movieId).Execute()

Example

package main

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

func main() {
	movieId := int32(56) // int32 |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
movieId int32

Return type

[]ReleaseResource

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]