7.2 Get My Groups

The getMyGroups:failure method returns all the groups, both public and private, the user is a member of.

Method parameters :

  • success : Success block to be executed after user's groups are successfully retrieved.

  • failure : Failure block to be executed if user's groups could not be retrieved, returns BayunError.

[[BayunCore sharedInstance] getMyGroups:^(NSArray<Group*> *myGroups)  {
     for(Group *group in groups) {
          NSLog(@"Group Id - %@",group.groupId);
          NSLog(@"Group Name - %@",group.groupName);
          GroupType groupType = group.groupType;
     }
} failure:^(BayunErrorbayunError) {
    NSLog(@"Error getting my groups.");
}];

Last updated