taycaldwell / riot-api-java

Riot Games API Java Library
http://taycaldwell.github.io/riot-api-java/
Apache License 2.0
192 stars 73 forks source link

Cant get the name of a champion #158

Open motion-cloud opened 4 years ago

motion-cloud commented 4 years ago

Im trying to get the name of the Champion, which a summoner played in his last game, but its not working.

public Champion getChampion(Platform server, String name) throws RiotApiException { Champion champion = LoLMain.getInstance().getApi().getDataChampion(server, getChampionID(server, name)); return champion; }

public String getChampionName(Platform server, String name) throws RiotApiException {
    return getChampion(server, name).getName();
}

Do I have to change the endpoint ?