content

package
v0.0.0-...-15d240f Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	*client.Client
}

func NewClient

func NewClient(baseUrl string) (Api, error)

func (*Api) DeleteBooks

func (a *Api) DeleteBooks(bookIds []string, library string) error

func (*Api) GetAllBooksIds

func (a *Api) GetAllBooksIds() ([]int64, error)

func (*Api) GetAllPublisher

func (a *Api) GetAllPublisher() ([]string, error)

func (*Api) GetBook

func (a *Api) GetBook(id string, library string) (int64, io.ReadCloser, error)

func (*Api) GetBookMetaDatas

func (a *Api) GetBookMetaDatas(ids []int64, library string) ([]Book, error)

func (*Api) GetCover

func (a *Api) GetCover(id string, library string) (int64, io.ReadCloser, error)

func (*Api) UpdateMetaData

func (a *Api) UpdateMetaData(id string, metadata map[string]interface{}, library string) (map[string]Content, error)

type Book

type Book struct {
	AuthorSort   string            `json:"author_sort"`
	Authors      []string          `json:"authors"`
	Comments     string            `json:"comments"`
	ID           int64             `json:"id"`
	Isbn         string            `json:"isbn"`
	Languages    []string          `json:"languages"`
	LastModified time.Time         `json:"last_modified"`
	PubDate      time.Time         `json:"pubdate"`
	Publisher    string            `json:"publisher"`
	SeriesIndex  float64           `json:"series_index"`
	Size         int64             `json:"size"`
	Tags         []string          `json:"tags"`
	Rating       float64           `json:"rating"`
	Title        string            `json:"title"`
	Identifiers  map[string]string `json:"identifiers"`
}

type Content

type Content struct {
	Formats             []string          `json:"formats"`
	FormatSizes         FormatSizes       `json:"format_sizes"`
	Authors             []string          `json:"authors"`
	Languages           []string          `json:"languages"`
	Publisher           string            `json:"publisher"`
	Identifiers         map[string]string `json:"identifiers"`
	AuthorSort          string            `json:"author_sort"`
	Comments            string            `json:"comments"`
	LastModified        time.Time         `json:"last_modified"`
	PubDate             time.Time         `json:"pubdate"`
	SeriesIndex         float64           `json:"series_index"`
	Sort                string            `json:"sort"`
	Size                int64             `json:"size"`
	Timestamp           string            `json:"timestamp"`
	Title               string            `json:"title"`
	UUID                string            `json:"uuid"`
	ID                  string            `json:"#id"`
	Isbn                string            `json:"#isbn"`
	UrlsFromIdentifiers [][]string        `json:"urls_from_identifiers"`
	LangNames           LangNames         `json:"lang_names"`
	Tags                []string          `json:"tags"`
	Rating              float64           `json:"rating"`
}

type FormatSizes

type FormatSizes struct {
	Epub int64 `json:"EPUB"`
}

type Identifiers

type Identifiers struct {
	Isbn string `json:"isbn"`
}

type LangNames

type LangNames struct {
	Zho string `json:"zho"`
}

Jump to

Keyboard shortcuts

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