struct

Anthropic::Page(T)

Inherits JSON::Serializable < Struct < Value < Object

Generic page response for cursor-based list endpoints. T is the type of items in the data array.

Constructors

new(data : Array(T) = [] of T, has_more : Bool = false, first_id : String | Nil = nil, last_id : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

data
Source
each

Iterates over all items on this page.

Source
empty?

Returns true if this page has no items.

Source
first_id
Source
has_more?
Source
last_id
Source
size

Returns the number of items on this page.

Source