meraki-analytics / orianna

A Java framework for the Riot Games League of Legends API (http://developer.riotgames.com/).
MIT License
182 stars 56 forks source link

league.getParticipantEntry() returns null #10

Closed SpiritedDusty closed 9 years ago

SpiritedDusty commented 9 years ago
    RiotAPI.setMirror(Region.NA);
    RiotAPI.setRegion(Region.NA);
    RiotAPI.setAPIKey("banana");

    Summoner summoner = RiotAPI.getSummonerByName("SpiritedDusty");

    for (League league : LeagueAPI.getLeagueEntriesBySummoner(summoner)) {
        if (league.getQueueType() == QueueType.RANKED_SOLO_5x5) {
            System.out.println(league.getParticipantEntry());
        }
    }

Pretty much what the title says. getParticipantEntry() returns null. I'm assuming it's supposed to return the LeagueEntry for the summoner object.

robrua commented 9 years ago

So this was the documented behavior for getParticipantEntry() on a league retrieved using getLeagueEntries, since these methods only return one entry per league. I've updated it to return the LeagueEntry instead.

This change will be in the next release, or you can get the most up-to-date snapshot at robrua.com/orianna