use of no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder in project L4J8 by stelar7.
the class CacheTest method testCacheStuff.
@Test
public void testCacheStuff() throws InterruptedException {
DataCall.setLogLevel(LogLevel.INFO);
DataCall.setCacheProvider(new FileSystemCacheProvider());
new SummonerBuilder().withPlatform(Constants.TEST_PLATFORM[0]).withSummonerId(Constants.TEST_SUMMONER_IDS[0]).get();
new SummonerBuilder().withPlatform(Constants.TEST_PLATFORM[0]).withSummonerId(Constants.TEST_SUMMONER_IDS[0]).get();
Thread.sleep(6000);
new SummonerBuilder().withPlatform(Constants.TEST_PLATFORM[0]).withSummonerId(Constants.TEST_SUMMONER_IDS[0]).get();
new SummonerBuilder().withPlatform(Constants.TEST_PLATFORM[0]).withSummonerId(Constants.TEST_SUMMONER_IDS[0]).get();
}
use of no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder in project L4J8 by stelar7.
the class FrameToImageTest method testStuff.
@Test
@Disabled
public void testStuff() {
DataCall.setCacheProvider(new FileSystemCacheProvider());
Summoner sum = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName("stelar7").get();
LazyList<String> refs = new MatchListBuilder().withPlatform(sum.getPlatform()).withPuuid(sum.getAccountId()).getLazy();
LOLMatch full = LOLMatch.get(sum.getPlatform(), refs.get(0));
TowerLocationType.getTowersMap(MapType.SUMMONERS_RIFT).forEach((k, v) -> v.forEach((k2, v2) -> v2.forEach((t, p) -> turretTeam.put(p, t))));
turretTeam.forEach((k, v) -> turrets.add(k));
InhibitorLocationType.getInhibMap(MapType.SUMMONERS_RIFT).forEach((k, v) -> v.forEach((t, p) -> inhibTeam.put(p, t)));
inhibTeam.forEach((k, v) -> inhib.add(k));
generateMinimap(full);
}
use of no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder 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());
}
use of no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder in project L4J8 by stelar7.
the class ChampionMasteryTest method testChampionMasteryScore.
@Test
public void testChampionMasteryScore() {
String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
Integer score = new ChampionMasteryBuilder().withPlatform(s.getPlatform()).withSummonerId(s.getSummonerId()).getMasteryScore();
Assertions.assertNotNull(score, "no data");
}
use of no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder in project L4J8 by stelar7.
the class RatelimitTest method testRateLimit.
@Test
@Disabled
public void testRateLimit() {
final R4J test = new R4J(SecretFile.CREDS);
String id = new SpectatorBuilder().withPlatform(LeagueShard.EUW1).getFeaturedGames().get(0).getParticipants().get(0).getSummonerName();
Summoner s = new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
for (int i2 = 0; i2 < 130; i2++) {
new SummonerBuilder().withPlatform(LeagueShard.EUW1).withName(id).get();
}
}
Aggregations