question

Ion avatar image
Ion asked

Getting all clan members data/account information without making a lot of API calls

Hello!

Which is the best practice for getting all members data? For example, for listing all the members of a clan, with some statistic, display name, etc.

I have been thinking about saving a statistic like: "clan-id" + "_level" when a player join a clan.

Then, i could get a leaderboard for a clan, with one single call, and using constraints get some data.

Is any feature coming about this for clans, or is this practice suitable for my needs?

Thanks!

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

·
pfnathan avatar image
pfnathan answered

At the moment, You cannot do bulk loads of your data but we are working on something like "a bulk fetch API". Will post an update once new API gets in.

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

Ion avatar image Ion commented ·

That sounds good. But meanwhile, do you have any tip about this?

Any help is welcome.

Thank you very much.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ Ion commented ·

Ideally, from our side, it would be a bulk load of the player profile so you could get statistic values etc., it's just that we don't have an API for that yet. But, you are on the right track with the leaderboard because we get profiles with the leaderboard. Will get back to you.

0 Likes 0 ·
Ion avatar image Ion pfnathan ♦ commented ·

Ok, thanks! :)

0 Likes 0 ·
Show more comments
Ion avatar image Ion Ion commented ·

I did it before publishing the comment :)

Then, should i make a lof of calls for getting the clan members, till the "bulk fetch API" is ready? Just for giving the shape to the "social part" of my game.

Thanks!

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ Ion commented ·

The only solution for the moment is to request each one; it's a high priority item which we are working on right now. Will post an update once fix complets.

1 Like 1 ·
Show more comments

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.