readarr

package
v0.0.0-...-f1df713 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilterAll starr.Filtering = iota
	FilterGrabbed

	FilterBookFileImported
	FilterDownloadFailed
	FilterDeleted
	FilterRenamed
	FilterImportFailed
	FilterDownloadImported
	FilterRetagged
	FilterIgnored
)

Filter values are integers. Given names for ease of discovery. https://github.com/Readarr/Readarr/blob/de72cfcaaa22495c7ce9fcb596a93beff6efb3d6/src/NzbDrone.Core/History/EntityHistory.cs#L31-L43

View Source
const APIver = "v1"

APIver is the Readarr API version supported by this library.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAuthorOptions

type AddAuthorOptions struct {
	SearchForMissingBooks bool    `json:"searchForMissingBooks"`
	Monitored             bool    `json:"monitored"`
	Monitor               string  `json:"monitor"`
	BooksToMonitor        []int64 `json:"booksToMonitor"`
}

AddAuthorOptions is part of AddBookAuthor.

type AddBookAuthor

type AddBookAuthor struct {
	Monitored         bool              `json:"monitored"`         // true?
	QualityProfileID  int64             `json:"qualityProfileId"`  // required
	MetadataProfileID int64             `json:"metadataProfileId"` // required
	ForeignAuthorID   string            `json:"foreignAuthorId"`   // required
	RootFolderPath    string            `json:"rootFolderPath"`    // required
	Tags              []int             `json:"tags"`
	AddOptions        *AddAuthorOptions `json:"addOptions"`
}

AddBookAuthor is part of AddBookInput.

type AddBookEdition

type AddBookEdition struct {
	Title            string         `json:"title"`            // Edition Title
	TitleSlug        string         `json:"titleSlug"`        // Slugs are dumb
	Images           []*starr.Image `json:"images"`           // this is dumb too
	ForeignEditionID string         `json:"foreignEditionId"` // GRID ID
	Monitored        bool           `json:"monitored"`        // true
	ManualAdd        bool           `json:"manualAdd"`        // true
}

AddBookEdition is part of AddBookInput.

type AddBookInput

type AddBookInput struct {
	Monitored     bool              `json:"monitored"`
	Tags          []int             `json:"tags"`
	AddOptions    *AddBookOptions   `json:"addOptions"`    // Contains Search.
	Author        *AddBookAuthor    `json:"author"`        // Contains Author ID
	Editions      []*AddBookEdition `json:"editions"`      // contains GRID Edition ID
	ForeignBookID string            `json:"foreignBookId"` // GRID Book ID.
}

AddBookInput is the input to add a book.

type AddBookOptions

type AddBookOptions struct {
	AddType          string `json:"addType,omitempty"`
	SearchForNewBook bool   `json:"searchForNewBook"`
}

AddBookOptions is part of AddBookInput.

type Author

type Author struct {
	ID                  int64          `json:"id"`
	Status              string         `json:"status,omitempty"`
	AuthorName          string         `json:"authorName,omitempty"`
	ForeignAuthorID     string         `json:"foreignAuthorId,omitempty"`
	TitleSlug           string         `json:"titleSlug,omitempty"`
	Overview            string         `json:"overview,omitempty"`
	Links               []*starr.Link  `json:"links,omitempty"`
	Images              []*starr.Image `json:"images,omitempty"`
	Path                string         `json:"path,omitempty"`
	QualityProfileID    int            `json:"qualityProfileId,omitempty"`
	MetadataProfileID   int            `json:"metadataProfileId,omitempty"`
	Genres              []string       `json:"genres,omitempty"`
	CleanName           string         `json:"cleanName,omitempty"`
	SortName            string         `json:"sortName,omitempty"`
	Tags                []int          `json:"tags,omitempty"`
	Added               time.Time      `json:"added,omitempty"`
	Ratings             *starr.Ratings `json:"ratings,omitempty"`
	Statistics          *Statistics    `json:"statistics,omitempty"`
	LastBook            *AuthorBook    `json:"lastBook,omitempty"`
	NextBook            *AuthorBook    `json:"nextBook,omitempty"`
	Ended               bool           `json:"ended,omitempty"`
	Monitored           bool           `json:"monitored"`
	AuthorMetadataID    int64          `json:"authorMetadataId"`
	AuthorNameLastFirst string         `json:"authorNameLastFirst"`
	MonitorNewItems     string         `json:"monitorNewItems"`
	SortNameLastFirst   string         `json:"sortNameLastFirst"`
}

Author is the /api/v1/author endpoint.

type AuthorBook

type AuthorBook struct {
	ID               int64           `json:"id"`
	AuthorMetadataID int             `json:"authorMetadataId"`
	ForeignBookID    string          `json:"foreignBookId"`
	TitleSlug        string          `json:"titleSlug"`
	Title            string          `json:"title"`
	ReleaseDate      time.Time       `json:"releaseDate"`
	Links            []*starr.Link   `json:"links"`
	Genres           []string        `json:"genres"`
	Ratings          *starr.Ratings  `json:"ratings"`
	CleanTitle       string          `json:"cleanTitle"`
	Monitored        bool            `json:"monitored"`
	AnyEditionOk     bool            `json:"anyEditionOk"`
	LastInfoSync     time.Time       `json:"lastInfoSync"`
	Added            time.Time       `json:"added"`
	AddOptions       *AddBookOptions `json:"addOptions"`
	AuthorMetadata   *starr.IsLoaded `json:"authorMetadata"`
	Author           *starr.IsLoaded `json:"author"`
	Editions         *starr.IsLoaded `json:"editions"`
	BookFiles        *starr.IsLoaded `json:"bookFiles"`
	SeriesLinks      *starr.IsLoaded `json:"seriesLinks"`
}

AuthorBook is part of an Author, and is very different from a normal Book type.

type Book

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

Book is the /api/v1/book endpoint among others, and gets used across this package.

type Calendar

type Calendar struct {
	Start         time.Time
	End           time.Time
	Unmonitored   bool
	IncludeAuthor bool
}

Calendar defines the filters for fetching calendar items.

type CommandRequest

type CommandRequest struct {
	Name    string  `json:"name"`
	BookIDs []int64 `json:"bookIds,omitempty"`
	BookID  int64   `json:"bookId,omitempty"`
}

CommandRequest goes into the /api/v1/command endpoint. This was created from the search command and may not support other commands yet.

type CommandResponse

type CommandResponse struct {
	ID                  int64                  `json:"id"`
	Name                string                 `json:"name"`
	CommandName         string                 `json:"commandName"`
	Message             string                 `json:"message,omitempty"`
	Priority            string                 `json:"priority"`
	Status              string                 `json:"status"`
	Queued              time.Time              `json:"queued"`
	Started             time.Time              `json:"started,omitempty"`
	Ended               time.Time              `json:"ended,omitempty"`
	StateChangeTime     time.Time              `json:"stateChangeTime,omitempty"`
	LastExecutionTime   time.Time              `json:"lastExecutionTime,omitempty"`
	Duration            string                 `json:"duration,omitempty"`
	Trigger             string                 `json:"trigger"`
	SendUpdatesToClient bool                   `json:"sendUpdatesToClient"`
	UpdateScheduledTask bool                   `json:"updateScheduledTask"`
	Body                map[string]interface{} `json:"body"`
}

CommandResponse comes from the /api/v1/command endpoint.

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           []*starr.Image `json:"images"`
	Links            []*starr.Link  `json:"links"`
	Ratings          *starr.Ratings `json:"ratings"`
	Monitored        bool           `json:"monitored"`
	ManualAdd        bool           `json:"manualAdd"`
	IsEbook          bool           `json:"isEbook"`
}

Edition is more Book meta data.

type History

type History struct {
	Page          int             `json:"page"`
	PageSize      int             `json:"pageSize"`
	SortKey       string          `json:"sortKey"`
	SortDirection string          `json:"sortDirection"`
	TotalRecords  int             `json:"totalRecords"`
	Records       []HistoryRecord `json:"records"`
}

History is the /api/v1/history endpoint.

type HistoryRecord

type HistoryRecord struct {
	ID                  int64          `json:"id"`
	BookID              int64          `json:"bookId"`
	AuthorID            int64          `json:"authorId"`
	SourceTitle         string         `json:"sourceTitle"`
	Quality             *starr.Quality `json:"quality"`
	QualityCutoffNotMet bool           `json:"qualityCutoffNotMet"`
	Date                time.Time      `json:"date"`
	DownloadID          string         `json:"downloadId"`
	EventType           string         `json:"eventType"`
	Data                struct {
		Age             string    `json:"age"`
		AgeHours        string    `json:"ageHours"`
		AgeMinutes      string    `json:"ageMinutes"`
		DownloadClient  string    `json:"downloadClient"`
		DownloadForced  string    `json:"downloadForced"`
		DownloadURL     string    `json:"downloadUrl"`
		DroppedPath     string    `json:"droppedPath"`
		GUID            string    `json:"guid"`
		ImportedPath    string    `json:"importedPath"`
		Indexer         string    `json:"indexer"`
		Message         string    `json:"message"`
		NzbInfoURL      string    `json:"nzbInfoUrl"`
		Protocol        string    `json:"protocol"`
		PublishedDate   time.Time `json:"publishedDate"`
		Reason          string    `json:"reason"`
		ReleaseGroup    string    `json:"releaseGroup"`
		Size            string    `json:"size"`
		StatusMessages  string    `json:"statusMessages"`
		TorrentInfoHash string    `json:"torrentInfoHash"`
	} `json:"data"`
}

HistoryRecord is part of the history. Not all items have all Data members. Check EventType for events you need.

type MetadataProfile

type MetadataProfile struct {
	ID                  int64   `json:"id"`
	Name                string  `json:"name"`
	MinPopularity       float64 `json:"minPopularity"`
	SkipMissingDate     bool    `json:"skipMissingDate"`
	SkipMissingIsbn     bool    `json:"skipMissingIsbn"`
	SkipPartsAndSets    bool    `json:"skipPartsAndSets"`
	SkipSeriesSecondary bool    `json:"skipSeriesSecondary"`
	AllowedLanguages    string  `json:"allowedLanguages,omitempty"`
}

MetadataProfile is the /api/v1/metadataProfile endpoint.

type QualityProfile

type QualityProfile struct {
	Name           string           `json:"name"`
	UpgradeAllowed bool             `json:"upgradeAllowed"`
	Cutoff         int64            `json:"cutoff"`
	Qualities      []*starr.Quality `json:"items"`
	ID             int64            `json:"id"`
}

QualityProfile is the /api/v1/qualityprofile endpoint.

type Queue

type Queue struct {
	Page          int            `json:"page"`
	PageSize      int            `json:"pageSize"`
	SortKey       string         `json:"sortKey"`
	SortDirection string         `json:"sortDirection"`
	TotalRecords  int            `json:"totalRecords"`
	Records       []*QueueRecord `json:"records"`
}

Queue is the /api/v1/queue endpoint.

type QueueRecord

type QueueRecord struct {
	AuthorID                int64                  `json:"authorId"`
	BookID                  int64                  `json:"bookId"`
	Quality                 *starr.Quality         `json:"quality"`
	Size                    float64                `json:"size"`
	Title                   string                 `json:"title"`
	Sizeleft                float64                `json:"sizeleft"`
	Timeleft                string                 `json:"timeleft"`
	EstimatedCompletionTime time.Time              `json:"estimatedCompletionTime"`
	Status                  string                 `json:"status"`
	TrackedDownloadStatus   string                 `json:"trackedDownloadStatus,omitempty"`
	TrackedDownloadState    string                 `json:"trackedDownloadState,omitempty"`
	StatusMessages          []*starr.StatusMessage `json:"statusMessages,omitempty"`
	DownloadID              string                 `json:"downloadId,omitempty"`
	Protocol                string                 `json:"protocol"`
	DownloadClient          string                 `json:"downloadClient,omitempty"`
	Indexer                 string                 `json:"indexer"`
	OutputPath              string                 `json:"outputPath,omitempty"`
	DownloadForced          bool                   `json:"downloadForced"`
	ID                      int64                  `json:"id"`
	ErrorMessage            string                 `json:"errorMessage"`
}

QueueRecord is a book from the queue API path.

type Readarr

type Readarr struct {
	starr.APIer
}

Readarr contains all the methods to interact with a Readarr server.

func New

func New(config *starr.Config) *Readarr

New returns a Readarr object used to interact with the Readarr API.

func (*Readarr) AddBook

func (r *Readarr) AddBook(book *AddBookInput) (*Book, error)

AddBook adds a new book to the library.

func (*Readarr) AddBookContext

func (r *Readarr) AddBookContext(ctx context.Context, book *AddBookInput) (*Book, error)

AddBookContext adds a new book to the library.

func (*Readarr) AddQualityProfile

func (r *Readarr) AddQualityProfile(profile *QualityProfile) (int64, error)

AddQualityProfile updates a quality profile in place.

func (*Readarr) AddQualityProfileContext

func (r *Readarr) AddQualityProfileContext(ctx context.Context, profile *QualityProfile) (int64, error)

AddQualityProfileContext updates a quality profile in place.

func (*Readarr) AddTag

func (r *Readarr) AddTag(tag *starr.Tag) (*starr.Tag, error)

AddTag creates a tag.

func (*Readarr) AddTagContext

func (r *Readarr) AddTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)

AddTagContext creates a tag.

func (*Readarr) DeleteQualityProfile

func (r *Readarr) DeleteQualityProfile(profileID int64) error

DeleteQualityProfile deletes a quality profile.

func (*Readarr) DeleteQualityProfileContext

func (r *Readarr) DeleteQualityProfileContext(ctx context.Context, profileID int64) error

DeleteQualityProfileContext deletes a quality profile.

func (*Readarr) DeleteTag

func (r *Readarr) DeleteTag(tagID int) error

DeleteTag removes a single tag.

func (*Readarr) DeleteTagContext

func (r *Readarr) DeleteTagContext(ctx context.Context, tagID int) error

DeleteTagContext removes a single tag.

func (*Readarr) Fail

func (r *Readarr) Fail(historyID int64) error

Fail marks the given history item as failed by id.

func (*Readarr) FailContext

func (r *Readarr) FailContext(ctx context.Context, historyID int64) error

FailContext marks the given history item as failed by id.

func (*Readarr) GetAuthorByID

func (r *Readarr) GetAuthorByID(authorID int64) (*Author, error)

GetAuthorByID returns an author.

func (*Readarr) GetAuthorByIDContext

func (r *Readarr) GetAuthorByIDContext(ctx context.Context, authorID int64) (*Author, error)

GetAuthorByIDContext returns an author.

func (*Readarr) GetBackupFiles

func (r *Readarr) GetBackupFiles() ([]*starr.BackupFile, error)

GetBackupFiles returns all available Readarr backup files. Use Get() to download a file using BackupFile.Path.

func (*Readarr) GetBackupFilesContext

func (r *Readarr) GetBackupFilesContext(ctx context.Context) ([]*starr.BackupFile, error)

GetBackupFilesContext returns all available Readarr backup files. Use Get() to download a file using BackupFile.Path.

func (*Readarr) GetBook

func (r *Readarr) GetBook(gridID string) ([]*Book, error)

GetBook returns books. All books are returned if gridID is empty.

func (*Readarr) GetBookByID

func (r *Readarr) GetBookByID(bookID int64) (*Book, error)

GetBookByID returns a book.

func (*Readarr) GetBookByIDContext

func (r *Readarr) GetBookByIDContext(ctx context.Context, bookID int64) (*Book, error)

GetBookByIDContext returns a book.

func (*Readarr) GetBookContext

func (r *Readarr) GetBookContext(ctx context.Context, gridID string) ([]*Book, error)

GetBookContext returns books. All books are returned if gridID is empty.

func (*Readarr) GetCalendar

func (r *Readarr) GetCalendar(filter Calendar) ([]*Book, error)

GetCalendar returns calendars based on filters.

func (*Readarr) GetCalendarContext

func (r *Readarr) GetCalendarContext(ctx context.Context, filter Calendar) ([]*Book, error)

GetCalendarContext returns calendars based on filters.

func (*Readarr) GetCalendarID

func (r *Readarr) GetCalendarID(calendarID int64) (*Book, error)

GetCalendarID returns a single calendar by ID.

func (*Readarr) GetCalendarIDContext

func (r *Readarr) GetCalendarIDContext(ctx context.Context, calendarID int64) (*Book, error)

GetCalendarIDContext returns a single calendar by ID.

func (*Readarr) GetCommands

func (r *Readarr) GetCommands() ([]*CommandResponse, error)

GetCommands returns all available Readarr commands. These can be used with SendCommand.

func (*Readarr) GetCommandsContext

func (r *Readarr) GetCommandsContext(ctx context.Context) ([]*CommandResponse, error)

GetCommandsContext returns all available Readarr commands. These can be used with SendCommand.

func (*Readarr) GetHistory

func (r *Readarr) GetHistory(records, perPage int) (*History, error)

GetHistory returns the Readarr History (grabs/failures/completed). WARNING: 12/30/2021 - this method changed. If you need control over the page, use readarr.GetHistoryPage(). This function simply returns the number of history records desired, up to the number of records present in the application. It grabs records in (paginated) batches of perPage, and concatenates them into one list. Passing zero for records will return all of them.

func (*Readarr) GetHistoryContext

func (r *Readarr) GetHistoryContext(ctx context.Context, records, perPage int) (*History, error)

GetHistoryContext returns the Readarr History (grabs/failures/completed). If you need control over the page, use readarr.GetHistoryPageContext().

func (*Readarr) GetHistoryPage

func (r *Readarr) GetHistoryPage(params *starr.PageReq) (*History, error)

GetHistoryPage returns a single page from the Readarr History (grabs/failures/completed). The page size and number is configurable with the input request parameters.

func (*Readarr) GetHistoryPageContext

func (r *Readarr) GetHistoryPageContext(ctx context.Context, params *starr.PageReq) (*History, error)

GetHistoryPageContext returns a single page from the Readarr History (grabs/failures/completed). The page size and number is configurable with the input request parameters.

func (*Readarr) GetMetadataProfiles

func (r *Readarr) GetMetadataProfiles() ([]*MetadataProfile, error)

GetMetadataProfiles returns the metadata profiles.

func (*Readarr) GetMetadataProfilesContext

func (r *Readarr) GetMetadataProfilesContext(ctx context.Context) ([]*MetadataProfile, error)

GetMetadataProfilesContext returns the metadata profiles.

func (*Readarr) GetQualityProfiles

func (r *Readarr) GetQualityProfiles() ([]*QualityProfile, error)

GetQualityProfiles returns the quality profiles.

func (*Readarr) GetQualityProfilesContext

func (r *Readarr) GetQualityProfilesContext(ctx context.Context) ([]*QualityProfile, error)

GetQualityProfilesContext returns the quality profiles.

func (*Readarr) GetQueue

func (r *Readarr) GetQueue(records, perPage int) (*Queue, error)

GetQueue returns a single page from the Readarr Queue (processing, but not yet imported). WARNING: 12/30/2021 - this method changed. If you need control over the page, use readarr.GetQueuePage(). This function simply returns the number of queue records desired, up to the number of records present in the application. It grabs records in (paginated) batches of perPage, and concatenates them into one list. Passing zero for records will return all of them.

func (*Readarr) GetQueueContext

func (r *Readarr) GetQueueContext(ctx context.Context, records, perPage int) (*Queue, error)

GetQueueContext returns a single page from the Readarr Queue (processing, but not yet imported). If you need control over the page, use readarr.GetQueuePageContext().

func (*Readarr) GetQueuePage

func (r *Readarr) GetQueuePage(params *starr.PageReq) (*Queue, error)

GetQueuePage returns a single page from the Readarr Queue. The page size and number is configurable with the input request parameters.

func (*Readarr) GetQueuePageContext

func (r *Readarr) GetQueuePageContext(ctx context.Context, params *starr.PageReq) (*Queue, error)

GetQueuePageContext returns a single page from the Readarr Queue. The page size and number is configurable with the input request parameters.

func (*Readarr) GetRootFolders

func (r *Readarr) GetRootFolders() ([]*RootFolder, error)

GetRootFolders returns all configured root folders.

func (*Readarr) GetRootFoldersContext

func (r *Readarr) GetRootFoldersContext(ctx context.Context) ([]*RootFolder, error)

GetRootFoldersContext returns all configured root folders.

func (*Readarr) GetSystemStatus

func (r *Readarr) GetSystemStatus() (*SystemStatus, error)

GetSystemStatus returns system status.

func (*Readarr) GetSystemStatusContext

func (r *Readarr) GetSystemStatusContext(ctx context.Context) (*SystemStatus, error)

GetSystemStatusContext returns system status.

func (*Readarr) GetTag

func (r *Readarr) GetTag(tagID int) (*starr.Tag, error)

GetTag returns a single tag.

func (*Readarr) GetTagContext

func (r *Readarr) GetTagContext(ctx context.Context, tagID int) (*starr.Tag, error)

GetTagContext returns a single tag.

func (*Readarr) GetTags

func (r *Readarr) GetTags() ([]*starr.Tag, error)

GetTags returns all configured tags.

func (*Readarr) GetTagsContext

func (r *Readarr) GetTagsContext(ctx context.Context) ([]*starr.Tag, error)

GetTagsContext returns all configured tags.

func (*Readarr) Lookup

func (r *Readarr) Lookup(term string) ([]*Book, error)

Lookup will search for books matching the specified search term.

func (*Readarr) LookupContext

func (r *Readarr) LookupContext(ctx context.Context, term string) ([]*Book, error)

LookupContext will search for books matching the specified search term.

func (*Readarr) SendCommand

func (r *Readarr) SendCommand(cmd *CommandRequest) (*CommandResponse, error)

SendCommand sends a command to Readarr.

func (*Readarr) SendCommandContext

func (r *Readarr) SendCommandContext(ctx context.Context, cmd *CommandRequest) (*CommandResponse, error)

SendCommandContext sends a command to Readarr.

func (*Readarr) UpdateAuthor

func (r *Readarr) UpdateAuthor(authorID int64, author *Author) error

UpdateAuthor updates an author in place.

func (*Readarr) UpdateAuthorContext

func (r *Readarr) UpdateAuthorContext(ctx context.Context, authorID int64, author *Author) error

UpdateAuthorContext updates an author in place.

func (*Readarr) UpdateBook

func (r *Readarr) UpdateBook(bookID int64, book *Book) error

UpdateBook updates a book in place.

func (*Readarr) UpdateBookContext

func (r *Readarr) UpdateBookContext(ctx context.Context, bookID int64, book *Book) error

UpdateBookContext updates a book in place.

func (*Readarr) UpdateQualityProfile

func (r *Readarr) UpdateQualityProfile(profile *QualityProfile) error

UpdateQualityProfile updates a quality profile in place.

func (*Readarr) UpdateQualityProfileContext

func (r *Readarr) UpdateQualityProfileContext(ctx context.Context, profile *QualityProfile) error

UpdateQualityProfileContext updates a quality profile in place.

func (*Readarr) UpdateTag

func (r *Readarr) UpdateTag(tag *starr.Tag) (*starr.Tag, error)

UpdateTag updates a tag.

func (*Readarr) UpdateTagContext

func (r *Readarr) UpdateTagContext(ctx context.Context, tag *starr.Tag) (*starr.Tag, error)

UpdateTagContext updates a tag.

type RootFolder

type RootFolder struct {
	ID                       int64  `json:"id"`
	Name                     string `json:"name"`
	Path                     string `json:"path"`
	DefaultMetadataProfileID int64  `json:"defaultMetadataProfileId"`
	DefaultQualityProfileID  int64  `json:"defaultQualityProfileId"`
	DefaultMonitorOption     string `json:"defaultMonitorOption"`
	DefaultTags              []int  `json:"defaultTags"`
	Port                     int    `json:"port"`
	OutputProfile            string `json:"outputProfile"`
	UseSsl                   bool   `json:"useSsl"`
	Accessible               bool   `json:"accessible"`
	IsCalibreLibrary         bool   `json:"isCalibreLibrary"`
	FreeSpace                int64  `json:"freeSpace"`
	TotalSpace               int64  `json:"totalSpace"`
}

RootFolder is the /api/v1/rootfolder endpoint.

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"`
	AvailableBookCount int     `json:"availableBookCount"`
}

Statistics for a Book, or maybe an author.

type SystemStatus

type SystemStatus struct {
	AppData                string    `json:"appData"`
	AppName                string    `json:"appName"`
	Authentication         string    `json:"authentication"`
	Branch                 string    `json:"branch"`
	BuildTime              time.Time `json:"buildTime"`
	DatabaseType           string    `json:"databaseType"`
	DatabaseVersion        string    `json:"databaseVersion"`
	InstanceName           string    `json:"instanceName"`
	IsAdmin                bool      `json:"isAdmin"`
	IsDebug                bool      `json:"isDebug"`
	IsDocker               bool      `json:"isDocker"`
	IsLinux                bool      `json:"isLinux"`
	IsMono                 bool      `json:"isMono"`
	IsNetCore              bool      `json:"isNetCore"`
	IsOsx                  bool      `json:"isOsx"`
	IsProduction           bool      `json:"isProduction"`
	IsUserInteractive      bool      `json:"isUserInteractive"`
	IsWindows              bool      `json:"isWindows"`
	MigrationVersion       int64     `json:"migrationVersion"`
	Mode                   string    `json:"mode"`
	OsName                 string    `json:"osName"`
	OsVersion              string    `json:"osVersion"`
	PackageAuthor          string    `json:"packageAuthor"`
	PackageUpdateMechanism string    `json:"packageUpdateMechanism"`
	PackageVersion         string    `json:"packageVersion"`
	RuntimeName            string    `json:"runtimeName"`
	RuntimeVersion         string    `json:"runtimeVersion"`
	StartTime              time.Time `json:"startTime"`
	StartupPath            string    `json:"startupPath"`
	URLBase                string    `json:"urlBase"`
	Version                string    `json:"version"`
}

SystemStatus is the /api/v1/system/status endpoint.

Jump to

Keyboard shortcuts

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