Skip to content

Runnetera Ranked

Antoine CLOP edited this page Aug 2, 2020 · 3 revisions

Runnetera Ranked

Runnetera ranked endpoint. There is currently only one method, that return the leaderboard for a specific region.

Methods

GetLeaderboard

Parameters

  • WorldRegion: The world region (America, Asia, Europe) to get the leaderboard from.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: ([RunneteraPlayer]?, String?). RunneteraPlayer contains the player name, and its rank in the leaderboard. The String parameter contains the first error description encountered if existing.

Usage example

league.lorAPI.getLeaderboard(on: .America) { (players, errorMsg) in
    if let players = players {
        print("Success!")
    } else {
       print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}
Clone this wiki locally