openlibrary

package
v0.0.0-...-3ac63f7 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 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 Fetcher

type Fetcher struct{}

func (*Fetcher) FetchByIsbn

func (f *Fetcher) FetchByIsbn(isbn string) (*integration.Metadata, error)

func (*Fetcher) FetchByQuery

func (f *Fetcher) FetchByQuery(query string) (*integration.QueryResults, error)

func (*Fetcher) FetchByWork

func (f *Fetcher) FetchByWork() error

TODO FetchByWork

func (*Fetcher) GetName

func (f *Fetcher) GetName() string

type OlMetadata

type OlMetadata struct {
	integration.Metadata
}

func (*OlMetadata) UnmarshalJSON

func (m *OlMetadata) UnmarshalJSON(buf []byte) error

type OlQueryResults

type OlQueryResults []*integration.Metadata

func (*OlQueryResults) UnmarshalJSON

func (q *OlQueryResults) UnmarshalJSON(buf []byte) error

type QueryJson

type QueryJson struct {
	Start    int `json:"start"`
	NumFound int `json:"numFound"`
	Results  []struct {
		Key      string `json:"key"`
		Title    string `json:"title"`
		Editions struct {
			Start    int `json:"start"`
			NumFound int `json:"numFound"`
			Results  []struct {
				Title         string   `json:"title"`
				Subtitle      string   `json:"subtitle,omitempty"`
				Authors       []string `json:"author_name"`
				CoverId       int      `json:"cover_i"`
				NumberOfPages int      `json:"number_of_pages_median"`

				// isbn10 and isbn13 of various editions
				Isbn []string `json:"isbn"`

				// multiple publishers of various editions
				Publishers []string `json:"publisher"`

				// both year and full dates
				PublishDate []string `json:"publish_date"`
			} `json:"docs"`
		} `json:"editions"`
	} `json:"docs"`
}

Jump to

Keyboard shortcuts

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