-
Notifications
You must be signed in to change notification settings - Fork 13
Profile Icons
Profile icons are images that every Summoner has as avatar.
- ProfileIconIds()
- ProfileIcon(by: ProfileIconId)
Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: ([ProfileIconId]?, String?)
. ProfileIconId array contains all unique identifier for profile icons and will be nil only if an error occured. The String parameter contains the first error description encountered if existing.
league.lolAPI.getProfileIconIds() { (profileIconIds, errorMsg) in
if let profileIconIds = profileIconIds {
print("Success!")
}
else {
print("Request failed cause: \(errorMsg ?? "No error description")")
}
}
- ProfileIconId: Represents the unique identifier of a profile icon. See ProfileIconIds above to get this identifier.
Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (ProfileIcon?, String?)
. ProfileIcon contains the image of the profile icon maching parameter ProfileIconId and will be nil only if profile icon identifier does not exist. The String parameter contains the first error description encountered if existing.
league.lolAPI.getProfileIcon(by: ProfileIconId(16)) { (profileIcon, errorMsg) in
if let profileIcon = profileIcon {
print("Success!")
}
else {
print("Request failed cause: \(errorMsg ?? "No error description")")
}
}