Search in sources :

Example 11 with FileSystemCacheProvider

use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.

the class StaticTest method testMasterySingleNoFlags.

@Test
public void testMasterySingleNoFlags() {
    DataCall.setCacheProvider(new FileSystemCacheProvider());
    DataCall.setLogLevel(LogLevel.DEBUG);
    StaticMastery list = api.getMastery(Platform.EUW1, 6131, null, null, null);
    Assert.assertTrue("ok?", list.getId() == 6131);
}
Also used : StaticMastery(no.stelar7.api.l4j8.pojo.staticdata.mastery.StaticMastery) FileSystemCacheProvider(no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider)

Example 12 with FileSystemCacheProvider

use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.

the class StaticTest method testPerkPathId.

@Test
public void testPerkPathId() {
    DataCall.setCacheProvider(new FileSystemCacheProvider());
    DataCall.setLogLevel(LogLevel.DEBUG);
    PerkPath paths = api.getPerkPath(Platform.EUW1, 8000, null, null);
}
Also used : FileSystemCacheProvider(no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider)

Example 13 with FileSystemCacheProvider

use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.

the class SummonerTest method before.

@Before
public void before() {
    DataCall.setCacheProvider(new FileSystemCacheProvider());
    DataCall.setLogLevel(LogLevel.DEBUG);
}
Also used : FileSystemCacheProvider(no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider)

Example 14 with FileSystemCacheProvider

use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider 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();
}
Also used : SummonerBuilder(no.stelar7.api.l4j8.impl.builders.summoner.SummonerBuilder)

Example 15 with FileSystemCacheProvider

use of no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider 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);
}
Also used : Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) IntStream(java.util.stream.IntStream) FileSystemCacheProvider(no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider) java.awt.image(java.awt.image) java.util(java.util) URL(java.net.URL) R4J(no.stelar7.api.r4j.impl.R4J) MatchListBuilder(no.stelar7.api.r4j.impl.lol.builders.matchv5.match.MatchListBuilder) DataCall(no.stelar7.api.r4j.basic.calling.DataCall) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) no.stelar7.api.r4j.pojo.lol.match.v5(no.stelar7.api.r4j.pojo.lol.match.v5) ImageIO(javax.imageio.ImageIO) Summoner(no.stelar7.api.r4j.pojo.lol.summoner.Summoner) Predicate(java.util.function.Predicate) AffineTransform(java.awt.geom.AffineTransform) Rectangle(no.stelar7.api.r4j.basic.utils.Rectangle) StaticChampion(no.stelar7.api.r4j.pojo.lol.staticdata.champion.StaticChampion) java.awt(java.awt) List(java.util.List) LeagueShard(no.stelar7.api.r4j.basic.constants.api.regions.LeagueShard) java.io(java.io) SecretFile(no.stelar7.api.r4j.tests.SecretFile) org.junit.jupiter.api(org.junit.jupiter.api) Item(no.stelar7.api.r4j.pojo.lol.staticdata.item.Item) no.stelar7.api.r4j.basic.constants.types.lol(no.stelar7.api.r4j.basic.constants.types.lol) no.stelar7.api.r4j.basic.utils(no.stelar7.api.r4j.basic.utils) SummonerBuilder(no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder) MatchListBuilder(no.stelar7.api.r4j.impl.lol.builders.matchv5.match.MatchListBuilder) FileSystemCacheProvider(no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider)

Aggregations

FileSystemCacheProvider (no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider)28 FileSystemCacheProvider (no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider)27 StaticMastery (no.stelar7.api.l4j8.pojo.staticdata.mastery.StaticMastery)5 Summoner (no.stelar7.api.r4j.pojo.lol.summoner.Summoner)5 SummonerBuilder (no.stelar7.api.l4j8.impl.builders.summoner.SummonerBuilder)4 StaticChampion (no.stelar7.api.l4j8.pojo.staticdata.champion.StaticChampion)4 java.util (java.util)3 StaticRune (no.stelar7.api.l4j8.pojo.staticdata.rune.StaticRune)3 Summoner (no.stelar7.api.l4j8.pojo.summoner.Summoner)3 R4J (no.stelar7.api.r4j.impl.R4J)3 Item (no.stelar7.api.r4j.pojo.lol.staticdata.item.Item)3 StaticMastery (no.stelar7.api.r4j.pojo.lol.staticdata.mastery.StaticMastery)3 StaticRune (no.stelar7.api.r4j.pojo.lol.staticdata.rune.StaticRune)3 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 List (java.util.List)2 Predicate (java.util.function.Predicate)2