ExIsbndb.Publisher (ExIsbndb v1.0.1)
The ExIsbndb.Publisher
module contains all the available endpoints for Publishers.
All functions need to receive a map with params, but only those needed for the endpoint will be taken.
Link to this section Summary
Functions
Returns the Publisher's details and a list of published Books.
Returns all the Publishers that match the given query.
Link to this section Functions
Link to this function
get(params)
@spec get(map()) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}
Returns the Publisher's details and a list of published Books.
Params required:
- name (string) - name of the Publisher
Params available:
- page (integer) - page number of the Books to be retrieved
- page_size(integer) - number of Books to be retrieved per page
Any other parameters will be ignored.
examples
Examples
iex> ExIsbndb.Publisher.get(%{name: "Pearson", page: 1, page_size: 5})
{:ok, %Finch.Response{body: "...", headers: [...], status: 200}}
Link to this function
search(params)
@spec search(map()) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}
Returns all the Publishers that match the given query.
Params required:
- query (string) - string used to search
Params available:
- page (integer) - page number of the Publishers to be searched
- page_size (integer) - number of Publishers to be searched per page
Any other parameters will be ignored.
examples
Examples
iex> ExIsbndb.Publisher.search(%{query: "oxford", page: 1, page_size: 5})
{:ok, %Finch.Response{body: "...", headers: [...], status: 200}}