sonarr

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTVShowOptions

type AddTVShowOptions struct {
	SearchForMissingEpisodes   bool `json:"searchForMissingEpisodes"`
	IgnoreEpisodesWithFiles    bool `json:"ignoreEpisodesWithFiles"`
	IgnoreEpisodesWithoutFiles bool `json:"ignoreEpisodesWithoutFiles"`
}

type AddTVShowRequest

type AddTVShowRequest struct {
	Title             string           `json:"title"`
	TitleSlug         string           `json:"titleSlug"`
	Images            []TVShowImage    `json:"images"`
	QualityProfileID  int              `json:"qualityProfileId"`
	LanguageProfileID int              `json:"languageProfileId"`
	TVDBID            int              `json:"tvdbId"`
	RootFolderPath    string           `json:"rootFolderPath"`
	Monitored         bool             `json:"monitored"`
	AddOptions        AddTVShowOptions `json:"addOptions"`
	Year              int              `json:"year"`
	Seasons           []*TVShowSeason  `json:"seasons"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c Config) (*Client, error)

func (*Client) AddTVShow

func (c *Client) AddTVShow(m TVShow, languageProfile int, qualityProfile int, path string) (tvShow TVShow, err error)

func (*Client) GetFolders

func (c *Client) GetFolders() ([]Folder, error)

func (*Client) GetProfile added in v0.1.1

func (c *Client) GetProfile(prfl string) ([]Profile, error)

func (*Client) SearchTVShows

func (c *Client) SearchTVShows(term string) ([]TVShow, error)

type Config

type Config struct {
	Hostname   string `json:"hostname"`
	APIKey     string `json:"apiKey"`
	Port       int    `json:"port"`
	URLBase    string `json:"urlBase"`
	SSL        bool   `json:"ssl"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	MaxResults int    `json:"maxResults"`
}

type Folder

type Folder struct {
	Path      string `json:"path"`
	FreeSpace int64  `json:"freeSpace"`
	ID        int    `json:"id"`
}

type Profile added in v0.1.1

type Profile struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
}

type TVShow

type TVShow struct {
	Title     string          `json:"title"`
	TitleSlug string          `json:"titleSlug"`
	Year      int             `json:"year"`
	PosterURL string          `json:"remotePoster"`
	TVDBID    int             `json:"tvdbId"`
	Images    []TVShowImage   `json:"images"`
	Seasons   []*TVShowSeason `json:"seasons"`
}

func (TVShow) String

func (m TVShow) String() string

type TVShowImage

type TVShowImage struct {
	CoverType string `json:"coverType"`
	URL       string `json:"url"`
}

type TVShowSeason

type TVShowSeason struct {
	SeasonNumber int  `json:"seasonNumber"`
	Monitored    bool `json:"monitored"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL