question

Michael Brennan avatar image
Michael Brennan asked

Is there a way to limit the number of statistics versions that are returned on a GetPlayerStatisticVersionsRequest?

I have a leaderboard that resets daily. In order to show some stats for the previous day's leaderboard, I need to know the versionId. To get the versionId, I call GetPlayerStatisticVersionsRequest.

I really only need the version information for the last leaderboards, but I cannot seem to find a way to limit the the number of PlayerStatisticVersion's returned. In my testing phase, I have 12 versions of the leaderboard (12 days of testing) and the GetPlayerStatisticVersionsRequest returns all 12 instances of PlayerStatisticVersion. What will happen after 3 months, 9 months or a year? Is there a limit to how many instances of the version information will be returned or a way to set a limit? If the app is running for a year, I really don't need to be sending the historical information for 365 leaderboards (ie version id, activation/deactivation time etc...) to every user, every day. It is just wasting resources...

Leaderboards 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

·
Xiao Zha avatar image
Xiao Zha answered

PlayFab does not provide such feature to limit the number of statistics versions that are returned on a GetPlayerStatisticVersionsRequest, you can post a feature request for it. If you only need the latest version number of the leaderboard, you can call the GetLeaderboard or GetPlayerStatistics API, both of which return the latest version number and do not include other historical version numbers.

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.

Michael Brennan avatar image Michael Brennan commented ·

Thanks for the answer, I may look into a workaround based on your suggestions.

1 Like 1 ·
Xiao Zha avatar image Xiao Zha Michael Brennan commented ·

If you have any other question, please feel free to let me know.

0 Likes 0 ·

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.