question

Pedro Juan avatar image
Pedro Juan asked

How to get a list of groups

Hi there, I am making a social heavy game and I will like to have a way to recover the groups in order to make players find clans/guild to play.

I have seen in another question (1 year ago) that there is no function for that but that it will be eventually implemented. Is any news on that?

Is there any workaround like implement the group ID in the title data and change it by cloudscript function execution every hour or so? Thanks in advance

CloudScriptTitle DataentitiesdataFriends
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sarah Zhang avatar image
Sarah Zhang answered

Currently, there is a way to list all the groups associated with an individual user. But listing all groups associated with a title has not been natively supported yet. To list all groups associated with one player, you can check the API ListMembership for more. You can also refer to this thread for how to use it.

Then for your question. A possible workaround is that adding the fake player in all groups of your title. And use this API to list all groups and roles for that player. Because getting the full list of all groups for a game would be a very expensive operation, you can use multiple fake players to split the full list into multiple parts.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pavan avatar image
Pavan answered

Any update ??

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ibrahim Abu khater avatar image
Ibrahim Abu khater answered

you can simply list the membership by using your title as the entity. to be more specific, here the request body: { "EntityKey":{ "Type":"title", "Id":"yourTitleID" } }

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.