Retrieve Group Data
Get Group Profile#
To get a group profile from server or local, call below method.
| Argument | Type | Description |
|---|---|---|
| groupJid | String | groupJid of a group |
| fetchFromServer | Bool | if fetchFromServer is true, prfoile details will be fetched from server or else (false) from local |
| completionHandler | FlyCompletionHandler | callback to get success or failure response. implemented as closure expression |
Get Participants#
To get group members from the server, call below method
| Argument | Type | Description |
|---|---|---|
| groupJid | String | groupJid of a group |
info
if getParticipants(groupJID: groupId) is success, didFetchGroupMembers(groupJid: String) method will be called, which is defined in GroupEventsDelegate.
Get Group Members from Local#
To get group member from local DB, call below method.
| Argument | Type | Description |
|---|---|---|
| groupJid | String | Jid of a group |
| Returns | Type | Description |
|---|---|---|
| (participantDetailArray : [GroupParticipantDetail] , message : String) | Tuple ([GroupParticipantDetail] ,String) | [GroupParticipantDetail] array of participant detail. message : response message |
Participant Existance in a Group#
To check a participant existance in a group, call below method
| Argument | Type | Description |
|---|---|---|
| groupJid | String | Jid of a group |
| participantJid | String | participantJid to check existance in the group |
| Returns | Type | Description |
|---|---|---|
| (doesExist : Bool, message : String) | Tuple (Bool,String) | doesExist is true, if participantJid is existing in the group. message : response message |
Check admin user#
To check a member is admin, call below method
| Argument | Type | Description |
|---|---|---|
| groupJid | String | Jid of a group |
| participantJid | String | participantJid to check admin user |
| Returns | Type | Description |
|---|---|---|
| (isAdmin : Bool,message :String) | Tuple (Bool,String) | isAdmin is true, if participantJid is admin. message : response message |
Get Group Count#
To get group count from local DB, call below method
| Return Type | Description | |
|---|---|---|
Int | returns the count of group from local DB |