readarr

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadRequestResponse

type BadRequestResponse struct {
	PropertyName   string `json:"propertyName"`
	ErrorMessage   string `json:"errorMessage"`
	ErrorCode      string `json:"errorCode"`
	AttemptedValue string `json:"attemptedValue"`
	Severity       string `json:"severity"`
}

func (*BadRequestResponse) String

func (r *BadRequestResponse) String() string

type Book

type Book struct {
	Title          string        `json:"title"`
	SeriesTitle    string        `json:"seriesTitle"`
	Overview       string        `json:"overview"`
	AuthorID       int64         `json:"authorId"`
	ForeignBookID  string        `json:"foreignBookId"`
	TitleSlug      string        `json:"titleSlug"`
	Monitored      bool          `json:"monitored"`
	AnyEditionOk   bool          `json:"anyEditionOk"`
	Ratings        *arr.Ratings  `json:"ratings"`
	ReleaseDate    time.Time     `json:"releaseDate"`
	PageCount      int           `json:"pageCount"`
	Genres         []interface{} `json:"genres"`
	Author         *BookAuthor   `json:"author,omitempty"`
	Images         []*arr.Image  `json:"images"`
	Links          []*arr.Link   `json:"links"`
	Statistics     *Statistics   `json:"statistics,omitempty"`
	Editions       []*Edition    `json:"editions"`
	ID             int64         `json:"id"`
	Disambiguation string        `json:"disambiguation,omitempty"`
}

type BookAuthor

type BookAuthor struct {
	ID                int64         `json:"id"`
	Status            string        `json:"status"`
	AuthorName        string        `json:"authorName"`
	ForeignAuthorID   string        `json:"foreignAuthorId"`
	TitleSlug         string        `json:"titleSlug"`
	Overview          string        `json:"overview"`
	Links             []*arr.Link   `json:"links"`
	Images            []*arr.Image  `json:"images"`
	Path              string        `json:"path"`
	QualityProfileID  int64         `json:"qualityProfileId"`
	MetadataProfileID int64         `json:"metadataProfileId"`
	Genres            []interface{} `json:"genres"`
	CleanName         string        `json:"cleanName"`
	SortName          string        `json:"sortName"`
	Tags              []int         `json:"tags"`
	Added             time.Time     `json:"added"`
	Ratings           *arr.Ratings  `json:"ratings"`
	Statistics        *Statistics   `json:"statistics"`
	Monitored         bool          `json:"monitored"`
	Ended             bool          `json:"ended"`
}

BookAuthor of a Book.

type Client

type Client struct {
	Log *log.Logger
	// contains filtered or unexported fields
}

func New

func New(config Config) *Client

New create new readarr Client

func (*Client) GetBooks

func (c *Client) GetBooks(ctx context.Context, gridID string) ([]Book, error)

func (*Client) GetTags

func (c *Client) GetTags(ctx context.Context) ([]*arr.Tag, error)

func (*Client) Push

func (c *Client) Push(ctx context.Context, release Release) ([]string, error)

func (*Client) Test

func (c *Client) Test(ctx context.Context) (*SystemStatusResponse, error)

type ClientInterface

type ClientInterface interface {
	Test(ctx context.Context) (*SystemStatusResponse, error)
	Push(ctx context.Context, release Release) ([]string, error)
}

type Config

type Config struct {
	Hostname string
	APIKey   string

	// basic auth username and password
	BasicAuth bool
	Username  string
	Password  string

	Log *log.Logger
}

type Edition

type Edition struct {
	ID               int64        `json:"id"`
	BookID           int64        `json:"bookId"`
	ForeignEditionID string       `json:"foreignEditionId"`
	TitleSlug        string       `json:"titleSlug"`
	Isbn13           string       `json:"isbn13"`
	Asin             string       `json:"asin"`
	Title            string       `json:"title"`
	Overview         string       `json:"overview"`
	Format           string       `json:"format"`
	Publisher        string       `json:"publisher"`
	PageCount        int          `json:"pageCount"`
	ReleaseDate      time.Time    `json:"releaseDate"`
	Images           []*arr.Image `json:"images"`
	Links            []*arr.Link  `json:"links"`
	Ratings          *arr.Ratings `json:"ratings"`
	Monitored        bool         `json:"monitored"`
	ManualAdd        bool         `json:"manualAdd"`
	IsEbook          bool         `json:"isEbook"`
}

Edition is more Book meta data.

type PushResponse

type PushResponse struct {
	Approved     bool     `json:"approved"`
	Rejected     bool     `json:"rejected"`
	TempRejected bool     `json:"temporarilyRejected"`
	Rejections   []string `json:"rejections"`
}

type Release

type Release struct {
	Title            string `json:"title"`
	InfoUrl          string `json:"infoUrl,omitempty"`
	DownloadUrl      string `json:"downloadUrl,omitempty"`
	MagnetUrl        string `json:"magnetUrl,omitempty"`
	Size             uint64 `json:"size"`
	Indexer          string `json:"indexer"`
	DownloadProtocol string `json:"downloadProtocol"`
	Protocol         string `json:"protocol"`
	PublishDate      string `json:"publishDate"`
	DownloadClientId int    `json:"downloadClientId,omitempty"`
	DownloadClient   string `json:"downloadClient,omitempty"`
}

type Statistics

type Statistics struct {
	BookCount      int     `json:"bookCount"`
	BookFileCount  int     `json:"bookFileCount"`
	TotalBookCount int     `json:"totalBookCount"`
	SizeOnDisk     int     `json:"sizeOnDisk"`
	PercentOfBooks float64 `json:"percentOfBooks"`
}

Statistics for a Book, or maybe an author.

type SystemStatusResponse

type SystemStatusResponse struct {
	AppName string `json:"appName"`
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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