-
Notifications
You must be signed in to change notification settings - Fork 13
Champion Mastery
Champion mastery is the experience a summoner acquires on every champions. Each mastery level on a champion increase summoner's mastery score.
- ChampionMasteries(by: SummonerId, on: Region)
- ChampionMastery(by: SummonerId, for: ChampionId, on: Region)
- MasteryScore(for: SummonerId, on: Region)
- SummonerId: Represents the unique identifier of a summoner. See Summoners to get this identifier.
- Region: The region where the summoner plays.
Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: ([ChampionMastery]?, String?)
. ChampionMastery array contains masteries and will be nil only if summoner was not found on this region. The String parameter contains the first error description encountered if existing.
league.lolAPI.getChampionMasteries(by: SummonerId("xc8IRVLGV1Gb75sbz8JoLdRvIJ_yAKNsSG1RBQVtnGZqZV8"), on: .EUW) { (championMasteries, errorMsg) in
if let championMasteries = championMasteries {
print("Success!")
}
else {
print("Request failed cause: \(errorMsg ?? "No error description")")
}
}
- SummonerId: Represents the unique identifier of a summoner. See Summoners to get this identifier.
- ChampionId: Represents the unique identifier of a champion. See Champions to get this identifier.
- Region: The region where the summoner plays.
Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: ([ChampionMastery]?, String?)
. ChampionMastery contains mastery for a specific champion and will be nil only if summoner was not found on this region or champion does not exists. The String parameter contains the first error description encountered if existing.
league.lolAPI.getChampionMastery(by: SummonerId("xc8IRVLGV1Gb75sbz8JoLdRvIJ_yAKNsSG1RBQVtnGZqZV8"), for: ChampionId(103), on: .EUW) { (championMastery, errorMsg) in
if let championMastery = championMastery {
print("Success!")
}
else {
print("Request failed cause: \(errorMsg ?? "No error description")")
}
}
- SummonerId: Represents the unique identifier of a summoner. See Summoners to get this identifier.
- Region: The region where the summoner plays.
Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (Int?, String?)
. The Int value represents the total mastery score and will be nil only if summoner was not found on this region. The String parameter contains the first error description encountered if existing.
league.lolAPI.getMasteryScore(for: SummonerId("xc8IRVLGV1Gb75sbz8JoLdRvIJ_yAKNsSG1RBQVtnGZqZV8"), on: .EUW) { (masteryScore, errorMsg) in
if let masteryScore = masteryScore {
print("Success!")
}
else {
print("Request failed cause: \(errorMsg ?? "No error description")")
}
}