question

jilm10001@gmail.com avatar image
jilm10001@gmail.com asked

Get Leaderboard archived log from client

Hi guys.

My game need to display daily leaderboards for last 7 days, and monthly leaderboard for last 6 months,. I know we can retrieve leaderboard archive logs using Admin API, but there's no way for me can get it from client-side. Any suggested solutions?

Thank you in advane.

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

·
brendan avatar image
brendan answered

Keeping many leaderboards around for query, for every statistic, isn't really economically feasible, as the cost to operate the leaderboards would then be N times the current cost, where N is the number of past versions you want to query. What we would recommend is to simply use multiple statistics for the weekly and monthly values, and rotate between them. So, for example, you would have HighScore1, HighScore2, etc., and you would use the correct one based upon the date (calculate it in Cloud Script from an arbitrary starting point).

5 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.

jilm10001@gmail.com avatar image jilm10001@gmail.com commented ·

Thank you for the answer. But I'm still confused...

As you recommended, in the case of "daily leaderboards for the last 7 days", I need to create 7 leaderboards (from Monday to Sunday) and make them auto reset weekly, at the same time in my Cloud Script, I will check the weekday and input highscore value to corresponding leaderboard. Is that what you mean? If I right, I can't do the same way for the other case "monthly leaderboard for the last 6 months".


So that's why I want to be able to retrieve the Leaderboard Archive Logs from client-side instead of using an Admin tool or create multiple statistics.

0 Likes 0 ·
brendan avatar image brendan jilm10001@gmail.com commented ·

No, setting them to the same reset time would result in everything being wiped once a week. If you want to have a rolling 7 day window of scores, you'll need to use https://api.playfab.com/Documentation/Admin/method/IncrementPlayerStatisticVersion to reset the statistics. You would do the same for the monthly reset statistics.

0 Likes 0 ·
jilm10001@gmail.com avatar image jilm10001@gmail.com brendan commented ·

So there's nothing I can do without an Admin tool? But I'm still not understand why the Archive logs can't be downloaded from Client API. :(

0 Likes 0 ·
Show more comments
jilm10001@gmail.com avatar image jilm10001@gmail.com commented ·

Yay, I think it's the only solution for now. Thank you very much.

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.