Documentation
¶
Overview ¶
Package openlibrary provides a client for the openlibrary.org HTTP API.
Index ¶
Constants ¶
View Source
const BaseURL = "https://openlibrary.org"
BaseURL is the base URL for the production openlibrary.org HTTP API.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { // BaseURL specifies the base URL to use in requests to the API. // If empty, the package constant BaseURL is used. BaseURL string // HTTP specifies the HTTP client to use in requests. // If nil, http.DefaultClient is used. HTTP *http.Client }
Client is a client for the openlibrary.org HTTP API.
The zero value is ready to use. Methods on a client are goroutine safe.
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, q SearchQuery) (*SearchResponse, error)
Search performs a search for the given query.
The function does not support pagination.
type SearchQuery ¶
type SearchResponse ¶
Click to show internal directories.
Click to hide internal directories.