question

Alex avatar image
Alex asked

Item count(*) for a player's inventory V2

Hi,

Is there a recommended way to count the total items a player has in her inventory to calculate the total inventory pages to show in a game item collection UI?

Thanks!

apisPlayer Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

The Economy API design favors large collections and uses the Continuation Token pattern instead of a paging pattern. UX that "Loads More" or progressively loads while scrolling often works better with larger sets of data.

There is no way to get the total count of items in an inventory collection without fully loading the whole thing.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.