Skip to content

Profile Icons

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

Profile Icons

Profile icons are images that every Summoner has as avatar.

Methods

ProfileIconIds

Parameters

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.

Usage example

league.lolAPI.getProfileIconIds() { (profileIconIds, errorMsg) in
    if let profileIconIds = profileIconIds {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

ProfileIcon

Parameters

  • 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.

Usage example

league.lolAPI.getProfileIcon(by: ProfileIconId(16)) { (profileIcon, errorMsg) in
    if let profileIcon = profileIcon {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}
Clone this wiki locally