ExIsbndb.Search (ExIsbndb v1.0.1)
The ExIsbndb.Search
module contains an endpoint that is able
to search anything inside the ISBNdb database.
The available function needs to receive a map with params, but only those needed for the endpoint will be taken.
Link to this section Summary
Functions
Returns all the results related to a topic that match the given params.
Link to this section Functions
Link to this function
all(params)
@spec all(map()) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}
Returns all the results related to a topic that match the given params.
No empty or nil values are permitted in this query.
Params required:
- index (string) - the topic where the search will be focused on
- valid values -
"subjects"
,"publishers"
,"authors"
,"books"
- valid values -
Params available:
- page (integer) - page number of the results
- page_size(integer) - number of results per page
- isbn (string) - an ISBN 10
- isbn13 (string) - an ISBN 13
- author (string) - the name of the author
- text (string) - a string to search in the determinated index topic
- subject (string) - a subject
- publisher (string) - the name of the publisher
- format (string) - the desired format of the response
Any other parameters will be ignored.
examples
Examples
iex> ExIsbndb.Search.all(%{index: "authors", page: 1, page_size: 5, author: "Stephen King"})
{:ok, %Finch.Response{body: "...", headers: [...], status: 200}}