audiobookshelf

package
v0.0.0-...-d0df922 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorMinified

type AuthorMinified struct {
	Id          string   `json:"id"`
	Asin        string   `json:"asin"`
	Name        string   `json:"name"`
	Description *string  `json:"description,omitempty"`
	ImagePath   *string  `json:"imagePath,omitempty"`
	AddedAt     UnixTime `json:"addedAt"`
	UpdatedAt   UnixTime `json:"updatedAt"`
}

type Client

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

func NewClient

func NewClient(baseUrl string, token string) *Client

func NewClientFromViper

func NewClientFromViper() *Client

func (*Client) GetLibrary

func (aac *Client) GetLibrary(libraryId string, includeFilterData bool) (Library, error)

func (*Client) ListLibraries

func (aac *Client) ListLibraries() ([]Library, error)

func (*Client) ScanLibrary

func (aac *Client) ScanLibrary(libraryId string, force bool) error

type Folder

type Folder struct {
	Id        string   `json:"id"`
	FullPath  string   `json:"fullPath"`
	LibraryId string   `json:"libraryId"`
	AddedAt   UnixTime `json:"addedAt"`
}

type Library

type Library struct {
	Id           string          `json:"id"`
	Name         string          `json:"name"`
	Folders      []Folder        `json:"folders"`
	DisplayOrder int             `json:"displayOrder"`
	Icon         string          `json:"icon"`
	MediaType    string          `json:"mediaType"`
	Provider     string          `json:"provider"`
	Settings     LibrarySettings `json:"settings"`
	CreatedAt    UnixTime        `json:"createdAt"`
	LastUpdate   UnixTime        `json:"lastUpdate"`
}

type LibraryDetails

type LibraryDetails struct {
	FilterData       LibraryFilterData `json:"filterData"`
	Issues           int               `json:"issues"`
	NumUserPlaylists int               `json:"numUserPlaylists"`
	Library          Library           `json:"library"`
}

type LibraryFilterData

type LibraryFilterData struct {
	Authors   []AuthorMinified `json:"authors"`
	Genres    []string         `json:"genres"`
	Tags      []string         `json:"tags"`
	Series    []Series         `json:"series"`
	Narrators []string         `json:"narrators"`
	Languages []string         `json:"languages"`
}

type LibrarySettings

type LibrarySettings struct {
	CoverAspectRation         int    `json:"coverAspectRatio "`
	DisableWatcher            bool   `json:"disableWatcher "`
	SkipMatchingMediaWithAsin bool   `json:"skipMatchingMediaWithAsin "`
	SkipMatchingMediaWithIsbn bool   `json:"skipMatchingMediaWithIsbn "`
	AutoScanCronExpression    string `json:"autoScanCronExpression "`
}

type Series

type Series struct {
	Id          string   `json:"id"`
	Name        string   `json:"name"`
	Description *string  `json:"desciption,omitempty"`
	AddedAt     UnixTime `json:"addedAt"`
	UpdatedAt   UnixTime `json:"updatedAt"`
}

type UnixTime

type UnixTime struct {
	time.Time
}

func (UnixTime) MarshalJSON

func (u UnixTime) MarshalJSON() ([]byte, error)

func (*UnixTime) UnmarshalJSON

func (u *UnixTime) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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