Package io.github.cobas91.lol.client
Class ChampionDownloader
java.lang.Object
io.github.cobas91.util.RiotApiHttpClient
io.github.cobas91.lol.client.ChampionDownloader
This class represents a Champion Downloader that is used to download
and retrieve information about champions in the game League of Legends.
It extends the HttpClientImpl class.
-
Field Summary
Fields inherited from class io.github.cobas91.util.RiotApiHttpClient
httpClient, log, mapper -
Method Summary
Modifier and TypeMethodDescriptionRetrieves detailed information about all champions in the game League of Legends.byte[]getIconAsByteArray(Champion champ, String iconNumber) Retrieves the icon of a champion as a byte array.voidsetDefaultChampSplash(Champion champion) Sets the default champion splash for the given champion.voidsetSkinSplashes(Champion champion) Sets the skin splashes for the given champion.Methods inherited from class io.github.cobas91.util.RiotApiHttpClient
getForUri, sendRequest
-
Method Details
-
getAllChampions
Retrieves detailed information about all champions in the game League of Legends.- Returns:
- A list of Champion objects representing all champions.
-
setSkinSplashes
Sets the skin splashes for the given champion. Each skin's image is obtained as a byte array using the champion's name and skin number. The obtained image is then set as the skin's image.- Parameters:
champion- The champion object for which the skin splashes should be set.
-
setDefaultChampSplash
Sets the default champion splash for the given champion.- Parameters:
champion- The champion for which the default champion splash should be set.
-
getIconAsByteArray
Retrieves the icon of a champion as a byte array.- Parameters:
champ- The Champion object representing the champion.iconNumber- The number of the icon to retrieve.- Returns:
- The champion's icon as a byte array.
-