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
parameters
The
Parameters
to apply.completion
The 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
parameters
The
Parameters
to apply.completion
The 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
id
ID of the badge that will be fetched.
parameters
The
Parameters
to apply.completion
The closure to be executed once the request has finished.