question

playfab-3 avatar image
playfab-3 asked

How to get multiple leaderboards in one call?,Setting multiple statistics in on call and receiving multiple leaderboards in one call

I am keeping daily, weekly and monthly high scores of my players and leaderboards for each of these. When a player gets a new record I am able to save all stats with one UpdatePlayerStatisticsRequest, but when getting the updated leaderboards I have to make 3 GetLeaderboardAroundPlayerRequest. Is that right or is there a way for me to reduce the amount of calls I haven't found yet?

,

It's really two issues, but I combine them in I question, since they seem related.

I keep daily, weekly and monthly leaderboards for my players' high scores. When they set a new record, I would like to be able to update several of these statistics at once and also request all three leaderboards at once to reduce the total number of calls.

So far these calls however seem to be designed for one call at a time, if I am not mistaken. Is that right or am I missing some way to actually send several requests at once?

If there is no way to do that yet, is there something I can do to request that feature or is this post enough?

apisLeaderboards and Statistics
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

·
brendan avatar image
brendan answered

Having a call that returns N leaderboards would cost N times the amount of compute and database lookup - there's no actual savings, apart from the latency of the query time. Understood that this is what you're saying you're trying to avoid, but a feature like that would necessarily be more expensive to operate, so if we let people call it at the same rate they can call other leaderboard operations, that would push us towards having to increase our prices, which we don't want to do.

What we have done is to give you the ability to return profile information for the player, as part of a leaderboard query. So you can get back the player's other statistics as part of any leaderboard query, allowing for much richer leaderboard displays. I'd recommend using that, and querying for each actual leaderboard you need independently.

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.