Lettermint.Types.CursorPage (Lettermint v2.1.0)

Copy Markdown View Source

A page of a cursor-paginated list. Pass next_cursor back as the cursor query parameter to read the next page; it is nil on the last page.

Fields

  • data: the items of this page
  • path: Base path for paginator generated URLs.
  • per_page: Number of items shown per page.
  • next_cursor: The "cursor" that points to the next set of items.
  • next_page_url
  • prev_cursor: The "cursor" that points to the previous set of items.
  • prev_page_url

Summary

Types

t()

@type t() :: t(term())

t(item)

@type t(item) :: %Lettermint.Types.CursorPage{
  data: [item],
  extra: %{optional(String.t()) => term()},
  next_cursor: String.t() | nil,
  next_page_url: String.t() | nil,
  path: String.t() | nil,
  per_page: integer(),
  prev_cursor: String.t() | nil,
  prev_page_url: String.t() | nil
}