Skip to main content
Version: 5.7.0

CreateGroupWithSummaryData

Create a group. Optional parameters: all except name and groupType.

ServiceOperation
groupCREATE_GROUP

Method Parameters

ParameterDescription
nameA name for the group.
groupTypeThe type of group.
isOpenGrouptrue if group is open; false if closed.
aclThe group's access control list. A null ACL implies default.
ownerAttributesAttributes for the group owner (current user.)
defaultMemberAttributesDefault attributes for group members.
dataCustom application data.
summaryDataPublic summary data for the group that is viewable even by non-members.

Usage

http://localhost:3000
string name = "myGroupName";
string groupType = "myGroupType";
bool isOpenGroup = true;
string acl = "{\"member\":2,\"other\":0}";
string ownerAttributes = "{}";
string defaultMemberAttributes = "{}";
string data = "{}";
string summaryData = "{}";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.groupService.CreateGroupWithSummaryData(name, groupType, isOpenGroup, acl, ownerAttributes, defaultMemberAttributes, data, summaryData, successCallback, failureCallback);
JSON Response
{
"data": {
"gameId": "12345",
"groupId": "b7b590e0-0e27-47ef-8bf5-03a3b4e34475",
"ownerId": "77ce8889-20b7-4d01-b248-e0beb747f1b4",
"name": "myGroupName",
"groupType": "myGroupType",
"createdAt": 1561472696504,
"updatedAt": 1561472696504,
"members": {
"77ce8889-20b7-4d01-b248-e0beb747f1b4": {
"role": "OWNER",
"attributes": {}
}
},
"pendingMembers": {},
"version": 1,
"summaryData": {},
"isOpenGroup": true,
"defaultMemberAttributes": {},
"memberCount": 1,
"invitedPendingMemberCount": 0,
"requestingPendingMemberCount": 0,
"acl": {
"member": 2,
"other": 0
}
},
"status": 200
}