LeaderboardsAPI
public enum LeaderboardsAPI
Caseless enumeration with static methods to send Leaderboard Requests
-
Sends a request to get leaderboard from the API.
Declaration
Swift
public static func getLeaderboards(with parameters: Parameters? = nil, completion: ResponseCompletion<[Leaderboard]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to get leaderboard for a page from the API.
Declaration
Swift
public static func getLeaderboards(forPage page: Int, completion: ResponseCompletion<[Leaderboard]> = nil)Parameters
pageThe page of the leaderboard.
completionThe closure to be executed once the request has finished.
-
Sends a request to get leaderboard.
Declaration
Swift
public static func getLeaderboard(name: String, category: String, with parameters: Parameters? = nil, completion: ResponseCompletion<[Leaderboard]> = nil)Parameters
nameThe name of the leaderboard.
categoryThe category of the leaderboard.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
-
Sends a request to get leaderboard.
Declaration
Swift
public static func getAroundMeLeaderboard(name: String, page: Int, size: Int, buffer: Int, completion: ResponseCompletion<Leaderboard.Feed> = nil)Parameters
nameThe name of the leaderboard.
pageThe page of the leaderboard.
sizeThe expected size of the result.
bufferThe buffer for the result.
completionThe closure to be executed once the request has finished.
View on GitHub
LeaderboardsAPI Enumeration Reference