question

Muhammad Roshaan Tariq avatar image
Muhammad Roshaan Tariq asked

How to get List of Clans/Groups available to Join?

Hi,

I am implementing the clan system in my game and I want the user to be able to see all the clans/groups of my game which are available to join.

The complication is I cannot find any API or cloud function to get the list and I also found some Playfab forum posts in which it is stated that "Playfab doesn't provide this feature yet" and I want to confirm the progress on it.

Thanks!

apissdksCloudScript
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

PlayFab has not provided this feature yet. However, CreateGroup is an Entity API, when it be called on CloudScript without assigning an account entity, title entity will be assigned and title will be the default Administrator of the generated Group. Then Entity API ListMembership can list all groups and roles for an entity. Hence, if all your groups are created by calling CreateGroup with title entity on CloudScript and you keep the title as the administrator of all groups, you can list these groups via ListMembership. You can try to execute the following CloudScript functions via client API ExecuteEntityCloudScript. The above content can be a possible workaround in certain situations. Besides, for any request of new features, you can navigate to Feature Requests, search for the corresponding posts to vote them or add a new feature request about listing all groups available to join. You can also track the progress of new features through the posts of feature requests.

handlers.CreateTitleGroup = function (args, context) {
    var createTitleGroup = entity.CreateGroup
        ({
            // assign the groupname via args here
            GroupName: args.groupname
        });
    return { createTitleGroup: createTitleGroup }
}

handlers.ListTitleMembership = function (args, context) {
    var listTitleMembership = entity.ListMembership
        ({
            Entity: {
                Id: "[YourTitleId]",
                Type: "title",
                TypeString: "title"
            }
        });
    return { listTitleMembership: listTitleMembership }
}

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

Muhammad Roshaan Tariq avatar image Muhammad Roshaan Tariq commented ·

Thanks @Sarah Zhang but now I am facing another problem. Please check it out

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Muhammad Roshaan Tariq commented ·

We will check it out.

0 Likes 0 ·
emreedemir avatar image emreedemir Sarah Zhang commented ·

What will happen if I call the groups that this entity is all connected to. Suppose this entity member has 100000 groups.Does playfab give a error ?.When calling ListMemberShips methods for this entity ?

0 Likes 0 ·
emreedemir avatar image emreedemir commented ·

What will happen if I call the groups that this entity is all connected to. Suppose this entity member has 100000 groups.Does playfab give a error ?.When calling ListMemberShips methods for this entity ?

0 Likes 0 ·
emreedemir avatar image
emreedemir answered

What will happen if I call the groups that this entity is all connected to. Suppose this entity member has 100000 groups.Does playfab give a error ?.When calling ListMemberShips methods for this entity ?

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.