QNGroupRepository
public class QNGroupRepository
Represents a Group
-
Name of the group
Declaration
Swift
public var name: String { get } -
Group identifier
Declaration
Swift
public var groupId: String { get } -
Group chat identifier
Declaration
Swift
public var chatId: String { get } -
Users who are joined to group
Declaration
Swift
public var participants: [QNUser] -
Group ringing strategy
Declaration
Swift
public var ringingStrategy: QNRingingStrategy { get }
-
Add a new participant to group
Declaration
Swift
public func add(user: QNUser, result: @escaping (Result<Void, ResourceError>) -> Void)Parameters
userUser to be added
resultResult with success when actions is completed
-
As group owners expel a participant from group
Declaration
Swift
public func expel(user: QNUser, result: @escaping (Result<Void, ResourceError>) -> Void)Parameters
participantParticipant to be expelled
resultResult with success when actions is completed
-
Leave the group
Declaration
Swift
public func leave(result: @escaping (Result<Void, ResourceError>) -> Void)Parameters
resultResult with success when actions is completed
-
As group owner expel all participants
Declaration
Swift
public func removeAllUsers(result: @escaping (Result<Void, ResourceError>) -> Void)Parameters
resultResult with success when actions is completed
-
Check if a participant belongs to the group
Declaration
Swift
public func hasParticipant(userId: String, result: @escaping (Result<Bool, ResourceError>) -> Void)Parameters
participantParticipant to check
resultResult with true if group contains the participant
-
Fetch phonebooks associated to the group
Declaration
Swift
public func getPhonebooks(result: @escaping (Result<[QNPhonebook], ResourceError>) -> Void)Parameters
resultResult with phonebooks
-
Update the list of group participants changing his order according to the received order.
Declaration
Swift
public func reorderParticipants(participants: [QNUser], result: @escaping (Result<Void, ResourceError>) -> Void)Parameters
participantsThe list of group participants with the desired order
resultResult with success when the action is completed
-
Change the ringing strategy of the group to the received value
Declaration
Swift
public func changeRingingStrategy(to ringingStrategy: QNRingingStrategy, result: @escaping (Result<Void, ResourceError>) -> Void)Parameters
toThe new ringing strategy to the group
QNGroupRepository Class Reference