Pagination
Understanding pagination​
When retrieving an array from the API (assets, avatars, heads,...), the results are paginated. That means that the items will be split in pages. Each page has a max of 100 items.
You can control this by passing the parameters size
and page
to the function. For example:
csharp
async void RetrieveAvatars(){// Split the avatars in pages of 10 items, and the the first pagePaginated<AvatarMetadata> avatarList = await session.GetAvatars(size: 10, page: 1);AvatarMetadata firstAvatar = avatarList.Items[0];// How many pages existDebug.Log(avatarList.Pages);// How many items existDebug.Log(avatarList.Total);// ...}
csharp
async void RetrieveAvatars(){// Split the avatars in pages of 10 items, and the the first pagePaginated<AvatarMetadata> avatarList = await session.GetAvatars(size: 10, page: 1);AvatarMetadata firstAvatar = avatarList.Items[0];// How many pages existDebug.Log(avatarList.Pages);// How many items existDebug.Log(avatarList.Total);// ...}