Skip to content

Latest commit

 

History

History
290 lines (188 loc) · 8 KB

EpisodeAPI.md

File metadata and controls

290 lines (188 loc) · 8 KB

\EpisodeAPI

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

Method HTTP request Description
GetEpisodeById Get /api/v3/episode/{id}
ListEpisode Get /api/v3/episode
PutEpisodeMonitor Put /api/v3/episode/monitor
UpdateEpisode Put /api/v3/episode/{id}

GetEpisodeById

EpisodeResource GetEpisodeById(ctx, id).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

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

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

Name Type Description Notes

Return type

EpisodeResource

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]

ListEpisode

[]EpisodeResource ListEpisode(ctx).SeriesId(seriesId).SeasonNumber(seasonNumber).EpisodeIds(episodeIds).EpisodeFileId(episodeFileId).IncludeSeries(includeSeries).IncludeEpisodeFile(includeEpisodeFile).IncludeImages(includeImages).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {
	seriesId := int32(56) // int32 |  (optional)
	seasonNumber := int32(56) // int32 |  (optional)
	episodeIds := []int32{int32(123)} // []int32 |  (optional)
	episodeFileId := int32(56) // int32 |  (optional)
	includeSeries := true // bool |  (optional) (default to false)
	includeEpisodeFile := true // bool |  (optional) (default to false)
	includeImages := true // bool |  (optional) (default to false)

	configuration := sonarrClient.NewConfiguration()
	apiClient := sonarrClient.NewAPIClient(configuration)
	resp, r, err := apiClient.EpisodeAPI.ListEpisode(context.Background()).SeriesId(seriesId).SeasonNumber(seasonNumber).EpisodeIds(episodeIds).EpisodeFileId(episodeFileId).IncludeSeries(includeSeries).IncludeEpisodeFile(includeEpisodeFile).IncludeImages(includeImages).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `EpisodeAPI.ListEpisode``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListEpisode`: []EpisodeResource
	fmt.Fprintf(os.Stdout, "Response from `EpisodeAPI.ListEpisode`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
seriesId int32
seasonNumber int32
episodeIds []int32
episodeFileId int32
includeSeries bool [default to false]
includeEpisodeFile bool [default to false]
includeImages bool [default to false]

Return type

[]EpisodeResource

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]

PutEpisodeMonitor

PutEpisodeMonitor(ctx).IncludeImages(includeImages).EpisodesMonitoredResource(episodesMonitoredResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {
	includeImages := true // bool |  (optional) (default to false)
	episodesMonitoredResource := *sonarrClient.NewEpisodesMonitoredResource() // EpisodesMonitoredResource |  (optional)

	configuration := sonarrClient.NewConfiguration()
	apiClient := sonarrClient.NewAPIClient(configuration)
	r, err := apiClient.EpisodeAPI.PutEpisodeMonitor(context.Background()).IncludeImages(includeImages).EpisodesMonitoredResource(episodesMonitoredResource).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `EpisodeAPI.PutEpisodeMonitor``: %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 apiPutEpisodeMonitorRequest struct via the builder pattern

Name Type Description Notes
includeImages bool [default to false]
episodesMonitoredResource EpisodesMonitoredResource

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]

UpdateEpisode

EpisodeResource UpdateEpisode(ctx, id).EpisodeResource(episodeResource).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {
	id := int32(56) // int32 | 
	episodeResource := *sonarrClient.NewEpisodeResource() // EpisodeResource |  (optional)

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

Name Type Description Notes

episodeResource | EpisodeResource | |

Return type

EpisodeResource

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]