struct Laspatule::Models::Page(T)

Overview

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.

Included Modules

Defined in:

laspatule/models/page.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(content : Array(T), next_page : String | Nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def clone #

[View source]
def content : Array(T) #

def copy_with(content _content = @content, next_page _next_page = @next_page) #

[View source]
def next_page : String | Nil #