StarlightListResponse <T>
Index
Properties
data
The list of entities returned by the API request. Its type depends on which request was made. SDK methods will generally type this parameter automatically.
links
An object containing useful links for easier pagination. All links points
to the same list requested, but with a varying page
parameter.
Type declaration
first: string
A link for the first page of the list.
last: string
A link for the last page of the list.
optionalnext?: string
A link to the next page of the list, if there’s any.
optionalprev?: string
A link to the previous page of the list, if there’s any.
meta
An object with useful metadata related to the current list. It can be used in applications to create pagination logic and interfaces.
from
and to
are indexes indicating which items start and finish the
current page of the list. For instance, in a list with 100 items with 15
items per page, on the first page, from
and to
will be 1
and 15
respectively.
Type declaration
current_page: number
The number of the current page.
from: number
The index of the first item on this page out of all list items.
last_page: number
The number of the last page for the current list.
per_page: number
The number of items per page.
to: number
The index of the last item on this page out of all list items.
total: number
The total number of items in the current list.
This interface represents an API response that returns a list of entities, like a list of Entries or a list of items from a Collection.
It contains a
data
parameter, which is an array of items with a generic type that depends on the kind of request that was made, and two metadata objects:links
andmeta
. Metadata is useful for pagination.All SDK request methods that return a list of entities will return this interface.