View Source JSONAPI.Paginator behaviour (jsonapi v1.8.3)

Pagination strategy behaviour

Summary

Types

@type links() :: %{
  first: String.t() | nil,
  last: String.t() | nil,
  next: String.t() | nil,
  prev: String.t() | nil
}
@type options() :: Keyword.t()
@type page() :: map()
@type params() :: %{required(String.t()) => String.t()}

Callbacks

Link to this callback

paginate(data, view, conn, page, options)

View Source
@callback paginate(
  data :: term(),
  view :: atom(),
  conn :: Plug.Conn.t(),
  page(),
  options()
) :: links()