question

Riccardo Iengo avatar image
Riccardo Iengo asked

Get player stats by name?

Hi!

How can I call multiple statistics and leaderboard position from cloud script? I need to display into my menu but I can't find any example

thanksss

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.

Seth Du avatar image Seth Du ♦ commented ·

May I ask what's the scenario that you require Cloud Script to call this API? GetLeaderboard has Client API and is able to be called in the game client directly.

Here is a sample of getting leaderboard -- Tournaments & Leaderboards quickstart - PlayFab | Microsoft Docs

1 Like 1 ·
Riccardo Iengo avatar image Riccardo Iengo Seth Du ♦ commented ·

On my game menu I display 3 levels on each section/page.

Because of this, I need to call 3 different leaderboards to get the relative stats (position, time and score) and it's probably better to avoid three simultaneous API call. Is there any way I can set up this in cloud script?

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

I think 3 APIs should work fine. There is upper bound limit of 100 calls per 2 minutes. As long as it is below this threshold, it should work fine. Besides, If you refer to the request body in Get Leaderboard document, you may define "ProfileConstraints" to retrieve additonal profile data for each player.

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.