question

bernardd avatar image
bernardd asked

Use CloudScript to get the list of players

Hi everyone,

In our game, we are developing a guild system of 20 members using the Groups feature. The Group API doesn't have any methods to get the list of members with a set of additional information (PlayerName for exemple).
Using a method like GetUserData by the client will make us hit the maximum API request rate so it is not a valid solution (limit of 2 calls per 2 seconds). We where thinking of using a CloudScript method to retrieve the list of members of a group, get some additional data and send them to the player. But we don't know if it is a reliable solution.
Does a behaviour like that will hit the Cloud script API requests limit or the cloud script execution time ?

If yes, if we want to do some pagination and only retrieve 5 players data information at a time to go around the limitation. Does the cloudscript execution time is constant for the same amount of methods called ? We want to be sure that calling 5 GerUserData method for example, will take the same amount of time and will not create a situation where Playfab we will hit the execution time limit inconsistently.


Thank you

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

·
Seth Du avatar image
Seth Du answered

You are able to use Cloud Script to retrieve Player detailed information, but there is specified limits to issue APIs calls per Cloud Script execution, which is 15 for essential tiers and this number can be increased for Enterprise tier users.

Retrieving 5 players information at a time should be totally fine but the key is the frequency of it. Basically the guild feature won’t require frequently update and if you fire 4 ExecuteCloudScript API calls for getting 5 player information per time, it shouldn’t exceed the limit. But the later updating process should be triggered by player’s active actions/interactions with corresponding guild members. For example, only list 10 players per page and players will need click next page button to update the following detailed information of members.

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.