Documentation ¶
Index ¶
Constants ¶
View Source
const (
// URL is the GoogleBooks API base URL used by this module.
URL = "https://www.googleapis.com/books/v1/volumes"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v0.5.0
type API struct { // OrderBy defines the query result sorting order. Accept: // . relevance - Returns results in order of the relevance of search terms // (default). // . newest - Returns results in order of most recently to least recently published. OrderBy string // MaxResults defines the maximum number of results to return. The default // is 10, and the maximum allowable value is 40. MaxResults int }
API represents a GoogleBooks api.
func (*API) SearchVolume ¶ added in v0.5.0
func (api *API) SearchVolume(vi *VolumeInfo) ([]*VolumeInfo, error)
SearchVolume queries GoogleBooks API for books that corresponds to the provided VolumeInfo.
type Identifier ¶ added in v0.5.0
type Identifier struct { // Type is the identifier type such as ISBN, ISBN_10, ISBN_13. Type string `json:"type"` // Identifier is the identifier value. Identifier string `json:"identifier"` }
Identifier represents an industry standard identifier.
type VolumeInfo ¶ added in v0.5.0
type VolumeInfo struct { // Title is the volume's title. Title string `json:"title"` // SubTitle is the volume's sub-title. SubTitle string `json:"subtitle"` // Language is the volume's language. It is the two-letter ISO 639-1 code // such as 'fr', 'en'. Language string `json:"language"` // Identifier is the industry standard identifiers for this volume such as // ISBN_10, ISBN_13. Identifier []Identifier `json:"industryIdentifiers"` // Authors is the list names of the authors and/or editors for this volume. Authors []string `json:"authors"` // Subject is the list of subject categories, such as "Fiction", // "Suspense". Subject []string `json:"categories"` // Description is the synopsis of the volume. The text of the description // is formatted in HTML and includes simple formatting elements. Description string `json:"description"` // Publisher is the publisher of this volume. Publisher string `json:"publisher"` // PublishedDate is date of publication of this volume. PublishedDate string `json:"publishedDate"` // PageCount is total number of pages of this volume. PageCount int64 `json:"pageCount"` }
VolumeInfo gathers information obtained from GoogleBooks API
func SearchVolume ¶ added in v0.5.0
func SearchVolume(vi *VolumeInfo) ([]*VolumeInfo, error)
SearchVolume queries GoogleBooks API with some default parameters.
Click to show internal directories.
Click to hide internal directories.