7.3 Get Unjoined Public Groups
The getUnjoinedPublicGroups:failure returns all the public groups of the company the employee is not a member of.
Method parameters :
success : Success block to be executed after public groups are successfully retrieved.
failure : Failure block to be executed if public groups could not be retrieved, returns
BayunError.
[[BayunCore sharedInstance] getUnjoinedPublicGroups:^(NSArray<Group*> *unjoinedPublicGroups) {
for(Group *group in unjoinedPublicGroups) {
NSLog(@"Group Id - %@",group.groupId);
NSLog(@"Group Name - %@",group.groupName);
GroupType groupType = group.groupType;
}
} failure:^(BayunError error) {
NSLog(@"Error getting Groups.");
}];BayunCore.sharedInstance().getUnjoinedPublicGroups({(unjoinedPublicGroups) in
for group in unjoinedPublicGroups! {
NSLog("Group Id - \(group.groupId!)")
NSLog("Group Name - \(group.groupName!)")
let groupType : GroupType = group.groupType
}
}, failure: { (bayunErrorCode)in
NSLog("Error getting Groups.")
})Last updated
Was this helpful?