Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ProviderGoogle is the constant representation for Google Books ProviderGoogle = "google" // ProviderOpenLibrary is the constant representation for Open Library ProviderOpenLibrary = "openlibrary" // ProviderGoodreads is the constant representation for Goodreads ProviderGoodreads = "goodreads" // ProviderIsbndb is the constant representation for ISBNDB ProviderIsbndb = "isbndb" )
Variables ¶
View Source
var DEFAULT_PROVIDERS = []string{ ProviderGoogle, ProviderOpenLibrary, ProviderGoodreads, ProviderIsbndb, }
DEFAULT_PROVIDERS contains all available providers, ie: Google Books, Open Library, Goodreads, & ISBNDB
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct {
Title string `json:"title"`
PublishedYear string `json:"published_year"`
Authors []string `json:"authors"`
Description string `json:"description"`
IndustryIdentifiers *Identifier `json:"industry_identifiers"`
PageCount int64 `json:"page_count"`
Categories []string `json:"categories"`
ImageLinks *ImageLinks `json:"image_links"`
Publisher string `json:"publisher"`
Language string `json:"language"`
Source string `json:"source"`
}
Book contains all the data retreived from providers
type GoISBN ¶
type GoISBN struct {
// contains filtered or unexported fields
}
GoISBN contains the providers and their respective resolver function with API Key for Goodreads and ISBNDB provider
func (*GoISBN) Get ¶
Get retreives the details of a book with the ISBN provided from previously initialized providers
func (*GoISBN) ValidateISBN ¶
ValidateISBN checks if the input isbn is in a valid ISBN 10 or ISBN 13 format
type Identifier ¶
Identifier contains the ISBN 10 and ISBN 13 data
type ImageLinks ¶
type ImageLinks struct {
SmallImageURL string `json:"small_image_url"`
ImageURL string `json:"image_url"`
LargeImageURL string `json:"large_image_url"`
}
ImageLinks contains all the image links related to the book
Click to show internal directories.
Click to hide internal directories.