7.5 Get Group By Id
The getGroupById:success:failure returns details of a group. Details include groupId, name, type, groupMembers. Any existing member of the group can retrieve details of the group, including the list of all the group members.
Method parameters :
groupId : Group Id of the Group.
success : Success block to be executed after group details are successfully retrieved.
failure : Failure block to be executed if group details could not be retrieved, returns
BayunError.
[[BayunCore sharedInstance] getGroupById:self.groupId success:^(Group* group) {
String *groupId = group.groupId;
String *groupName = group.groupName;
GroupType groupType = group.groupType;
NSArray<GroupMember*> *groupMembers = group.groupMembers;
} failure:^(BayunError error) {
NSLog(@"Error getting Group by Id");
}];BayunCore.sharedInstance().getGroupById("", success: {(group)in
let groupId : String = group!.groupId
let groupName : String = group!.groupName
let groupMembers : [GroupMember] = group!.groupMembers
let groupType : GroupType = group!.groupType
}, failure: {(bayunErrorCode)in
NSLog("Error getting Group by Id")
})Last updated
Was this helpful?