Idea

nitin20csu074 avatar image
nitin20csu074 suggested

GetPlayerCombinedInfo should return Inventory V2

Hi! I am using Inventory V2 where to fetch a user's complete info I'm calling LoginWithCustomId with params PlayerProfile which returns me all data about the user from legacy inventory but not from Inventory V2. Now, to fetch inventory V2, I need to call an extra 2 API calls (overall calls can be more as it depends on the number of items) for it:

  1. PlayFabEconomy.GetInventoryItems - to fetch all inventory items, also I want to know how to fetch a single type of inventory from it, like Currency or Items or UGC.

  2. PlayFabEconomy.GetItems - to fetch the above items' data as there is no way to get details about these items in the first one.

So, I'm gonna propose two features:

  1. Add Inventory V2 support to PlayerCombinedInfo and LoginWithCustomID with profile constraints.

  2. Add constraints to get item details in PlayFabEconomy.GetInventoryItems and also a filter constraint to filter the type of inventory item.

Also is there any way to execute operations on Inventory V2 without the entityToken of a user I want to execute these operations after some time on the server side where I have the developer secret key and playfabId of users but not their entityToken and I don't want to execute redundant API calls first to get each player entityToken and then add or subtract items for inventory V2.

Player DataIn-Game EconomyPlayer 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 Comment

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

Just a couple of notes here.

For GetInventoryItems, you can use the Filter property to scope your request to specific types, items, or stacks.

https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/get-inventory-items?view=playfab-rest#request-body

For ExecuteInventoryOperations (and all Entity APIs), you always need to call with an entity token. However, you can easily exchange the developer secret key for a Title entity token and cache that. You will need to renew occasionally, but not very often. Then is each request you can set the Entity property to target each player individually.

https://learn.microsoft.com/en-us/rest/api/playfab/economy/inventory/execute-inventory-operations?view=playfab-rest#request-body

Note that Entity Id is not the same as playfabId. You will want to get the title_player_account Entity Id from the login call and use that instead. The playfabId equals the master_player_account Entity Id, but that's not the value you want to use in most Entity APIs.

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 a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.