Search in sources :

Example 31 with Summoner

use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.

the class SummonerTest method testByName.

@Test
public void testByName() {
    String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
    Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
    Summoner optional = new SummonerBuilder().withPlatform(s.getPlatform()).withName(s.getNormalizedName()).get();
    doAssertions.accept(optional);
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) SpectatorBuilder(no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)

Example 32 with Summoner

use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.

the class SummonerTest method testById.

@Test
public void testById() {
    /*
        Summoner ids have been removed from the spectator endpoint, so this test wont work anymore...
        
        String   id = new SpectatorBuilder().withPlatform(Platform.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerId();
        Summoner s  = new SummonerBuilder().withPlatform(Platform.EUW1).withSummonerId(id).get();
         */
    String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
    Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
    doAssertions.accept(s);
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) SpectatorBuilder(no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)

Example 33 with Summoner

use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.

the class ChampionMasteryTest method testChampionMasteryAll.

@Test
public void testChampionMasteryAll() {
    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<ChampionMastery> all = new ChampionMasteryBuilder().withPlatform(s.getPlatform()).withSummonerId(s.getSummonerId()).getChampionMasteries();
    assert all != null;
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) ChampionMasteryBuilder(no.stelar7.api.r4j.impl.lol.builders.championmastery.ChampionMasteryBuilder) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) ChampionMastery(no.stelar7.api.r4j.pojo.lol.championmastery.ChampionMastery) SpectatorBuilder(no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)

Example 34 with Summoner

use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.

the class ChampionMasteryTest method testChampionMasteryTop.

@Test
public void testChampionMasteryTop() {
    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<ChampionMastery> all = new ChampionMasteryBuilder().withPlatform(s.getPlatform()).withSummonerId(s.getSummonerId()).getTopChampions(null);
    assert all != null;
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) ChampionMasteryBuilder(no.stelar7.api.r4j.impl.lol.builders.championmastery.ChampionMasteryBuilder) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) ChampionMastery(no.stelar7.api.r4j.pojo.lol.championmastery.ChampionMastery) SpectatorBuilder(no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)

Example 35 with Summoner

use of no.stelar7.api.r4j.pojo.lol.summoner.Summoner in project L4J8 by stelar7.

the class ChampionMasteryTest method testChampionMastery.

@Test
public void testChampionMastery() {
    String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
    Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
    ChampionMastery mastery;
    ChampionMasteryBuilder bu = new ChampionMasteryBuilder().withPlatform(s.getPlatform()).withSummonerId(s.getSummonerId());
    mastery = bu.withChampionId(1).getChampionMastery();
    assert mastery != null;
    mastery = bu.withChampionId(2).getChampionMastery();
    assert mastery != null;
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) ChampionMasteryBuilder(no.stelar7.api.r4j.impl.lol.builders.championmastery.ChampionMasteryBuilder) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) ChampionMastery(no.stelar7.api.r4j.pojo.lol.championmastery.ChampionMastery) SpectatorBuilder(no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)

Aggregations

Summoner (no.stelar7.api.r4j.pojo.lol.summoner.Summoner)33 SummonerBuilder (no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder)19 SpectatorBuilder (no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)15 Summoner (no.stelar7.api.l4j8.pojo.summoner.Summoner)13 SummonerBuilder (no.stelar7.api.l4j8.impl.builders.summoner.SummonerBuilder)9 R4J (no.stelar7.api.r4j.impl.R4J)7 FileSystemCacheProvider (no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider)5 Optional (java.util.Optional)4 ChampionMasteryBuilder (no.stelar7.api.r4j.impl.lol.builders.championmastery.ChampionMasteryBuilder)4 ChampionMastery (no.stelar7.api.r4j.pojo.lol.championmastery.ChampionMastery)4 java.util (java.util)3 FileSystemCacheProvider (no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider)3 L4J8 (no.stelar7.api.l4j8.impl.L4J8)3 MatchListBuilder (no.stelar7.api.l4j8.impl.builders.match.MatchListBuilder)3 JsonWriter (com.google.gson.stream.JsonWriter)2 java.awt (java.awt)2 AffineTransform (java.awt.geom.AffineTransform)2 java.awt.image (java.awt.image)2 java.io (java.io)2 URL (java.net.URL)2