ExIsbndb.Subject (ExIsbndb v1.0.1)

The ExIsbndb.Subject module contains all the available endpoints for Subjects.

Link to this section Summary

Functions

Returns details of a Subject and a list of Books that belong to it.

Returns all the Subjects that match the given query.

Link to this section Functions

@spec get(binary()) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}

Returns details of a Subject and a list of Books that belong to it.

Params required:

  • name (string) - name of the Subject

examples

Examples

iex> ExIsbndb.Subject.get("drama")
{:ok, %Finch.Response{body: "...", headers: [...], status: 200}}
@spec search(map()) :: {:ok, Finch.Response.t()} | {:error, Exception.t()}

Returns all the Subjects that match the given query.

Params required:

  • query (string) - string used to search

Params available:

  • page (integer) - page number of the Subjects to be searched
  • page_size (integer) - number of Subjects to be searched per page

Any other parameters will be ignored.

examples

Examples

iex> ExIsbndb.Subject.search(%{query: "epic", page: 1, page_size: 5})
{:ok, %Finch.Response{body: "...", headers: [...], status: 200}}