-
Notifications
You must be signed in to change notification settings - Fork 13
Ranked Leagues EXP
Antoine CLOP edited this page Aug 2, 2020
·
3 revisions
Riot Games is introducing a new API method to get ranked entries. The only difference with the original Ranked/Leagues QueueEntries is that this new one can return entries for Challenger, Grand Master and Master leagues. This is Experimental: in November they will decide whether to keep it or not. However if you already want to include it in your app, LeagueAPI supports this route from version 2.2.0.
- QueueEntries(on: Region, queue: Queue, division: RankedDivision, page: Int = 1)
- Region: The region to execute the request against.
- Queue: The ranked queue desired.
- RankedDivision: The full division desired (Tier + Division). Division starts from 4 ("IV") to 1 ("I"). The value must be set to 1 (or "I") if league is either Challenger, Grand Master or Master.
- Page: Optional parameter specifying the desired page result starting at 1.
Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: ([RankedEntry]?, String?)
. The result of this request contain players information in the specified division/queue. See RankedEntry. The String parameter contains the first error description encountered if existing.
guard let queue = Queue(.RankedSolo5V5) else { return }
guard let tier = RankedTier(.Challenger) else { return }
league.lolAPI.getQueueEntriesExp(on: .EUW, queue: queue, division: RankedDivision(tier: tier, divisionRoman: "I")) { (entries, errorMsg) in
if let entries = entries {
print("Success!")
}
else {
print("Request failed cause: \(errorMsg ?? "No error description")")
}
}