QNGroupsRepository
public class QNGroupsRepository
Provides methods to retrieve all groups or by its identifier
-
createGroup(named:Asynchronousidentified: ) Creates a new group
Declaration
Swift
public func createGroup(named: String, identified: String?) async throws -> QNGroupRepositoryParameters
namedName use as alias
identifiedGroup identifier, if empty server will create one
-
delete(group:Asynchronous) Deletes a group
Declaration
Swift
public func delete(group: QNGroupRepository) async throwsParameters
groupGroup to be deleted
-
leaveAllGroups()AsynchronousCurrent user leaves all groups where he/she is participating
Declaration
Swift
public func leaveAllGroups() async throwsParameters
taskResult success when operation is completed
-
groups(userIsParticipating:AsynchronousfromCache: ) Fetch all groups
Declaration
Swift
public func groups(userIsParticipating: Bool, fromCache: Bool) async throws -> [QNGroupRepository]Parameters
userIsParticipatingSet true to fetch only groups where user is participating
fromCacheRetrieve from cache or server; true by default
-
group(with:AsynchronousfromCache: ) Fetch a group with a specific groupId
Declaration
Swift
public func group(with groupId: String, fromCache: Bool) async throws -> QNGroupRepositoryParameters
groupIdThe groupId to fetch
fromCacheRetrieve from cache or server; true by default