struct

Laspatule::Models::Page(T)

Inherits JSON::Serializable < Struct < Value < Object

Represents a page of T elements, when doing a query with pagination.

To get the first page, the query must be done without next_page token. To get the following page, the token next_page from the current page must be provided to the query.

If next_page if empty it means the current page is the last one.

next_page should be considered to be an opaque token.

Constructors

new(content : Array(T), next_page : String | Nil)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

clone
Source
content
copy_with(content _content = @content, next_page _next_page = @next_page)
Source
next_page