Skip to content

Latest commit

 

History

History
155 lines (102 loc) · 4.35 KB

CalendarAPI.md

File metadata and controls

155 lines (102 loc) · 4.35 KB

\CalendarAPI

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

Method HTTP request Description
GetCalendarById Get /api/v3/calendar/{id}
ListCalendar Get /api/v3/calendar

GetCalendarById

EpisodeResource GetCalendarById(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.CalendarAPI.GetCalendarById(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CalendarAPI.GetCalendarById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetCalendarById`: EpisodeResource
	fmt.Fprintf(os.Stdout, "Response from `CalendarAPI.GetCalendarById`: %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 apiGetCalendarByIdRequest 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]

ListCalendar

[]EpisodeResource ListCalendar(ctx).Start(start).End(end).Unmonitored(unmonitored).IncludeSeries(includeSeries).IncludeEpisodeFile(includeEpisodeFile).IncludeEpisodeImages(includeEpisodeImages).Tags(tags).Execute()

Example

package main

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

func main() {
	start := time.Now() // time.Time |  (optional)
	end := time.Now() // time.Time |  (optional)
	unmonitored := true // bool |  (optional) (default to false)
	includeSeries := true // bool |  (optional) (default to false)
	includeEpisodeFile := true // bool |  (optional) (default to false)
	includeEpisodeImages := true // bool |  (optional) (default to false)
	tags := "tags_example" // string |  (optional) (default to "")

	configuration := sonarrClient.NewConfiguration()
	apiClient := sonarrClient.NewAPIClient(configuration)
	resp, r, err := apiClient.CalendarAPI.ListCalendar(context.Background()).Start(start).End(end).Unmonitored(unmonitored).IncludeSeries(includeSeries).IncludeEpisodeFile(includeEpisodeFile).IncludeEpisodeImages(includeEpisodeImages).Tags(tags).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `CalendarAPI.ListCalendar``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListCalendar`: []EpisodeResource
	fmt.Fprintf(os.Stdout, "Response from `CalendarAPI.ListCalendar`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
start time.Time
end time.Time
unmonitored bool [default to false]
includeSeries bool [default to false]
includeEpisodeFile bool [default to false]
includeEpisodeImages bool [default to false]
tags string [default to ""]

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]