GroupsAPI
public enum GroupsAPI
Caseless enumeration with static methods to send Groups Requests.
-
Sends a request to get groups from the API.
Declaration
Swift
public static func getGroups(with parameters: Parameters? = nil, completion: ResponseCompletion<[Group]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to get groups joined from the API.
Declaration
Swift
public static func getGroupsJoined(with parameters: Parameters? = nil, completion: ResponseCompletion<[Group]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to get group classes from the API.
Declaration
Swift
public static func getGroupsClasses(with parameters: Parameters? = nil, completion: ResponseCompletion<[GroupClass]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to get members in a group from the API.
Declaration
Swift
public static func getGroupMembersInGroup(id: Int, with parameters: Parameters? = nil, completion: ResponseCompletion<[Member]> = nil)Parameters
idThe id of the group.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to join a group from the API.
Declaration
Swift
public static func joinGroup(id: Int, with parameters: Parameters? = nil, completion: ResponseCompletion<Bool> = nil)Parameters
idThe id of the group.
completionThe closure to be executed once the request has finished.
-
Sends a request to leave a group from the API.
Declaration
Swift
public static func leaveGroup(id: Int, with parameters: Parameters? = nil, completion: ResponseCompletion<Bool> = nil)Parameters
idThe id of the group.
completionThe closure to be executed once the request has finished.
View on GitHub
GroupsAPI Enumeration Reference