question

vivecuervo7 avatar image
vivecuervo7 asked

Unsure as to how to retrieve entity data from leaderboards

Hi, I'm running into some trouble with fetching player profiles through the entity system. I currently save a player's deck as an object, which I can retrieve just fine as long as I use their TitleId. As far as I can see, the ClientAPI methods for getting leaderboards only returns the PlayFabId. I'm unable from this point to get their entity profile in order to retrieve their objects - am I missing a step here, or can the PlayFabId be used to retrieve a profile? If not, what are the chances of getting the current ClientAPI methods to return the player's TitleId, to easier combine methods from ClientAPI and EntityAPIs?

Thanks,

Isaac

Player DataLeaderboards and Statisticsentities
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

·
vivecuervo7 avatar image
vivecuervo7 answered

Hmm, ok I managed find a way around it by using GetAccountInfo, but now I'm just wrapping the GetObjects call inside the other. I'm not sure if I can get around this by changing the policy to allow object retrieval based off master_player_account, to avoid the extra call - if this is possible please let me know as I'd of course prefer to limit the amount of connectivity required.

Ideally, it'd be nice to be able to retrieve the Entity Profile directly from the leaderboard itself, as currently I load the 50 players around the user, and then have to fetch their deck after the select an opponent. I'd love to be able to roll the object request into the leaderboard request, but as this is (currently?) a separate API I'd imagine it can't be done.

1 comment
10 |1200

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

brendan avatar image brendan commented ·

Correct - what you're looking at is the fact that we have two distinct models. The pre-existing data/profile model, and the entity model that we're moving to. As we roll out more components of the complete entity model, that'll make things like this simpler. For now, yes, once the player clicks to choose an opponent, using the process you describe to get the entity object would be the way to do. For anyone else following this thread, the key thing to highlight here is that trying to iterate across all the players returned from the leaderboard call and take action on each would generate far too many API calls, which could result in getting your title throttled or blocked, so making that be a query on a single player based upon an active player selection is the way to go.

1 Like 1 ·

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.