BadgesAPI
public enum BadgesAPI
Caseless enumeration with static methods to send Badges Requests
-
Sends a request to get badges from the API.
Declaration
Swift
public static func getBadges(with parameters: Parameters? = nil, completion: ResponseCompletion<[Badge]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to get badges awarded to a user.
Declaration
Swift
public static func getEarnedBadges(with parameters: Parameters? = nil, completion: ResponseCompletion<[Badge]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to get badge with ID.
Declaration
Swift
public static func getEarnedBadge(id: Int, with parameters: Parameters? = nil, completion: ResponseCompletion<Badge> = nil)Parameters
idID of the badge that will be fetched.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
View on GitHub
BadgesAPI Enumeration Reference