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");
}];

Last updated