Search in sources :

Example 1 with LeagueEntry

use of no.stelar7.api.r4j.pojo.lol.league.LeagueEntry in project L4J8 by stelar7.

the class LeagueTest method testLeagueEntry.

@Test
public void testLeagueEntry() {
    String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
    Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
    List<LeagueEntry> data = new LeagueBuilder().withPlatform(LeagueShard.EUW1).withSummonerId(s.getSummonerId()).getLeagueEntries();
    System.out.println(data.size());
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) LeagueBuilder(no.stelar7.api.r4j.impl.lol.builders.league.LeagueBuilder) LeagueEntry(no.stelar7.api.r4j.pojo.lol.league.LeagueEntry) SpectatorBuilder(no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)

Example 2 with LeagueEntry

use of no.stelar7.api.r4j.pojo.lol.league.LeagueEntry in project L4J8 by stelar7.

the class MatchListV5Test method testForMissingAttributes.

@Test
public void testForMissingAttributes() {
    LeagueAPI leagueAPI = r4J.getLoLAPI().getLeagueAPI();
    List<LeagueEntry> divis = leagueAPI.getLeagueByTierDivision(LeagueShard.EUW1, GameQueueType.RANKED_SOLO_5X5, TierDivisionType.GOLD_I, 1);
    for (LeagueEntry entry : divis) {
        Summoner summoner = Summoner.bySummonerId(LeagueShard.EUW1, entry.getSummonerId());
        List<String> lazy = summoner.getLeagueGames().get();
        for (int i = 0; i < lazy.size() && i < 5; i++) {
            String match = lazy.get(i);
            LOLMatch lolMatch = LOLMatch.get(LeagueShard.EUW1, match);
            lolMatch.getTimeline();
        }
    }
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) LeagueEntry(no.stelar7.api.r4j.pojo.lol.league.LeagueEntry) LeagueAPI(no.stelar7.api.r4j.impl.lol.raw.LeagueAPI)

Aggregations

LeagueEntry (no.stelar7.api.r4j.pojo.lol.league.LeagueEntry)2 Summoner (no.stelar7.api.r4j.pojo.lol.summoner.Summoner)2 LeagueBuilder (no.stelar7.api.r4j.impl.lol.builders.league.LeagueBuilder)1 SpectatorBuilder (no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)1 SummonerBuilder (no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder)1 LeagueAPI (no.stelar7.api.r4j.impl.lol.raw.LeagueAPI)1