question

drallcom3 avatar image
drallcom3 asked

Economy v2: GetInventoryItemsRequest.Count bug

GetInventoryItemsRequest.Count is bugged.

Anything other than the default value (10) and the request is rejected (Error 400).

11, 25, 40, 49, 50 all don't work.

2 comments
10 |1200

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

Gosen Gao avatar image Gosen Gao commented ·

I have done a test in Unity, and the API GetInventoryItems works fine with "GetInventoryItemsRequest.Count = 11(and 25)". Can you share us a code snippet to repro? And what is the detailed error message?

0 Likes 0 ·
drallcom3 avatar image drallcom3 Gosen Gao commented ·

This here only works with 10 (using the latest Unity SDK from your Github):

GetInventoryItemsRequest request = new GetInventoryItemsRequest
            {
                Entity = _entityTokenEconomy,
                ContinuationToken = null,
                Count = 11

            };

            PlayFabEconomyAPI.GetInventoryItems(
                    request,
                    result =>
                    {
                        Debug.LogFormat("<color=green>GetInventory success</color>, continuationToken={0}, time={1}", "", Time.time);

                        foreach (var entry in result.Items)
                        {
                            Debug.LogFormat("<color=yellow>{0}</color>, Id={1}, StackId={2}", entry.Type, entry.Id, entry.StackId);
                        }

                        AddItem();
                    },
                    error =>
                    {
                        Debug.LogError(error);
                    }
                );
/Inventory/GetInventoryItems: {"code":400,"status":"BadRequest","data":{}}

Edit: <=10 works. Looks like the maximum page size is 10 (the page size for Search() is also wrong).

0 Likes 0 ·

1 Answer

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

I've added both these bugs to the backlog. We'll fix them soon.

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.