Search in sources :

Example 11 with FileSystemCacheProvider

use of no.stelar7.api.l4j8.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.l4j8.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.l4j8.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.l4j8.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.l4j8.basic.cache.impl.FileSystemCacheProvider in project L4J8 by stelar7.

the class FrameToImageTest method testStuff.

@Test
@Ignore
public void testStuff() {
    DataCall.setCacheProvider(new FileSystemCacheProvider());
    Summoner sum = new SummonerBuilder().withPlatform(Platform.EUW1).withName("stelar7").get();
    LazyList<MatchReference> refs = new MatchListBuilder().withPlatform(sum.getPlatform()).withAccountId(sum.getAccountId()).getLazy();
    Match full = refs.get(0).getFullMatch();
    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.l4j8.pojo.summoner.Summoner) IntStream(java.util.stream.IntStream) Platform(no.stelar7.api.l4j8.basic.constants.api.Platform) no.stelar7.api.l4j8.basic.utils(no.stelar7.api.l4j8.basic.utils) java.awt.image(java.awt.image) java.util(java.util) Item(no.stelar7.api.l4j8.pojo.staticdata.item.Item) no.stelar7.api.l4j8.basic.constants.types(no.stelar7.api.l4j8.basic.constants.types) URL(java.net.URL) Predicate(java.util.function.Predicate) no.stelar7.api.l4j8.pojo.match(no.stelar7.api.l4j8.pojo.match) SummonerBuilder(no.stelar7.api.l4j8.impl.builders.summoner.SummonerBuilder) AffineTransform(java.awt.geom.AffineTransform) L4J8(no.stelar7.api.l4j8.impl.L4J8) FileSystemCacheProvider(no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider) java.awt(java.awt) List(java.util.List) Summoner(no.stelar7.api.l4j8.pojo.summoner.Summoner) java.io(java.io) MatchListBuilder(no.stelar7.api.l4j8.impl.builders.match.MatchListBuilder) SecretFile(no.stelar7.api.l4j8.tests.SecretFile) ImageIO(javax.imageio.ImageIO) org.junit(org.junit) StaticChampion(no.stelar7.api.l4j8.pojo.staticdata.champion.StaticChampion) DataCall(no.stelar7.api.l4j8.basic.calling.DataCall) SummonerBuilder(no.stelar7.api.l4j8.impl.builders.summoner.SummonerBuilder) MatchListBuilder(no.stelar7.api.l4j8.impl.builders.match.MatchListBuilder) FileSystemCacheProvider(no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider)

Aggregations

FileSystemCacheProvider (no.stelar7.api.l4j8.basic.cache.impl.FileSystemCacheProvider)28 StaticMastery (no.stelar7.api.l4j8.pojo.staticdata.mastery.StaticMastery)5 SummonerBuilder (no.stelar7.api.l4j8.impl.builders.summoner.SummonerBuilder)4 StaticChampion (no.stelar7.api.l4j8.pojo.staticdata.champion.StaticChampion)4 StaticRune (no.stelar7.api.l4j8.pojo.staticdata.rune.StaticRune)3 Summoner (no.stelar7.api.l4j8.pojo.summoner.Summoner)3 L4J8 (no.stelar7.api.l4j8.impl.L4J8)2 StaticSummonerSpell (no.stelar7.api.l4j8.pojo.staticdata.summonerspell.StaticSummonerSpell)2 java.awt (java.awt)1 AffineTransform (java.awt.geom.AffineTransform)1 java.awt.image (java.awt.image)1 java.io (java.io)1 URL (java.net.URL)1 java.util (java.util)1 List (java.util.List)1 Predicate (java.util.function.Predicate)1 IntStream (java.util.stream.IntStream)1 ImageIO (javax.imageio.ImageIO)1 DataCall (no.stelar7.api.l4j8.basic.calling.DataCall)1 Platform (no.stelar7.api.l4j8.basic.constants.api.Platform)1