Group Members SummaryData
-
Hey,
It would be nice if I could see the summaryData of group members when I read a group, unless this is already possible?
Regards,
Omar -
In addition, I need to be able to retrieve a list of players summary data by providing their profile Ids, as opposed to doing one profileId at a time (which is costly).
My current work-around is storing player's id in their summary data and using FindUsersByUserSummary with the mongo query $or on the summary id.
-
Not sure if this will help you, but I wrote a cloud script for one of our apps that takes a list of profileids and returns their summery data. Note I'm not a pro at the cloud scripting, but this works for our needs.
var memIds = data.memberIds; var results = {}; var getGroup = bridge.getFriendServiceProxy(); for(i = 0;i < memIds.length;i++) { var memId = memIds[i]; results[memIds[i]] = getGroup.getSummaryDataForProfileId(memId); } results;
-
Hey Chris,
The issue with this approach is that it's an API call per loop iteration (discounted API call).
-
Hi guys,
Couple of comments...
First of all, thanks for providing that script @Chris-Brown - that's handy.
Also note - the first 3 api calls in a cloud code script are free, and each one afterwards is just 1/2 a count - so if you were looking up 10 players, instead of it costing 10 API calls, it would cost just 4.5 (1+7/2) using Chris's script - a definite savings.
@Omar-Alzayed you seem to have two requests - but they are related I think. i.e. would you need a separate call to retrieve multiple player summary datas if the summaryData of group members was being returned?
Just ensuring that I understand the use cases...
Paul.
-
Oh, and @Omar-Alzayed - your technique of putting the profileId in the summary data is clever - though it won't be super fast as you scale up. Summary data isn't indexed the way that profileId's in general are...
Just FYI...
Paul.
-
That's good to know. This means I need to upgrade to an alternate method. We have 50 guild members + up to 10 guild applicants per group. So, it's too costly to do it per id (our title requires having all summary data available on guild load). But if the summary data for group members included that of pending members (applicants/invited) then it would suffice. If that's not a difficult thing to add, it would be much appreciated! Kind of like the option to include summary data in listing friends.
Thanks,
Omar -
We'll look into it @Omar-Alzayed ...
Paul.