PaginatesList
trait PaginatesList
Properties
| protected string|null | $cursor | ||
| protected int|null | $limit |
Methods
string
listType()
Get the plural primitive name used as the list key and method prefix (e.g. 'tools', 'prompts').
nextPage(string|null $cursor)
Build the request for the next page at the given cursor.
hydrate(array $payloads)
Hydrate the listed primitives.
string
method()
Get the list method name.
array
params()
Get the current page parameters.
Details
at line 22
abstract protected string
listType()
Get the plural primitive name used as the list key and method prefix (e.g. 'tools', 'prompts').
at line 27
abstract protected PaginatesList
nextPage(string|null $cursor)
Build the request for the next page at the given cursor.
at line 35
abstract protected Collection
hydrate(array $payloads)
Hydrate the listed primitives.
at line 40
string
method()
Get the list method name.
at line 50
array
params()
Get the current page parameters.
at line 60
Collection
handle(Protocol $protocol)
Fetch and hydrate the requested primitives.
at line 70
protected array
fetch(Protocol $protocol)
Fetch pages up to the requested limit.