jd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	URL      string `json:"url,omitempty"`
	Size     uint   `json:"size,omitempty"`
	Duration string `json:"duration,omitempty"`
	Title    string `json:"title,omitempty"`
}

Address contains the parameters of the file by which you can download it.

type Addresses

type Addresses []Address

Addresses just a set of addresses with the ability to parse not a set, but one address as such cases are in the API.

func (*Addresses) UnmarshalJSON

func (a *Addresses) UnmarshalJSON(bs []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Author

type Author struct {
	Name  string `json:"name,omitempty"`
	Photo string `json:"photo,omitempty"`
	Info  string `json:"info,omitempty"`
}

Author contains information about the author of the book.

type Book

type Book struct {
	ID           int           `json:"id"`
	Title        string        `json:"title"`
	Subtitle     string        `json:"subtitle"`
	BookPartLink string        `json:"bookPartLink"`
	Badges       []string      `json:"badges,omitempty"`
	SimilarBooks []string      `json:"similarBooks,omitempty"`
	Cover        Cover         `json:"cover"`
	NewCover     string        `json:"newCover"`
	Files        Files         `json:"files"`
	TopSmile     interface{}   `json:"topSmile,omitempty"`
	MifURL       string        `json:"mifUrl"`
	Description  string        `json:"description"`
	Stickers     []TTS         `json:"stickers,omitempty"`
	Quotes       []TTS         `json:"quotes,omitempty"`
	Experts      []interface{} `json:"experts,omitempty"`
	Photos       []Address     `json:"photos,omitempty"`
	Videos       []Address     `json:"videos,omitempty"`
	Spreads      []interface{} `json:"spreads,omitempty"`
	Authors      []Author      `json:"authors,omitempty"`
	DiscountURL  string        `json:"discountUrl"`
	Downloads    int           `json:"downloads"`
}

Book the dataset about the book.

type Books

type Books struct {
	Books []Book `json:"books,omitempty"`
	Total uint
}

Books response from API which contains books and their number.

type Cover

type Cover struct {
	Small string `json:"small,omitempty"`
	Large string `json:"large,omitempty"`
}

Cover address on the cover of the book.

type Files

type Files struct {
	Books      map[string]Addresses `json:"ebook"`
	AudioBooks map[string]Addresses `json:"audiobook"`
	Demo       map[string]Addresses `json:"demo"`
}

Files information about all available files for download.

type TTS

type TTS struct {
	Style string `json:"style,omitempty"`
	Text  string `json:"text,omitempty"`
	Title string `json:"title,omitempty"`
}

TTS structure for different descriptions.

Jump to

Keyboard shortcuts

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