Search in sources :

Example 16 with R4J

use of no.stelar7.api.r4j.impl.R4J in project L4J8 by stelar7.

the class TestVALMatch method getDeep.

@Test
public void getDeep() {
    R4J api = new R4J(SecretFile.CREDS);
    VALMatchAPI matchAPI = api.getVALAPI().getMatchAPI();
    RiotAccount account = api.getAccountAPI().getAccountByTag(RegionShard.EUROPE, "Jbzz", "EUW");
    List<String> ids = new ArrayList<>();
    ids.add(account.getPUUID());
    List<MatchReference> matchlist = matchAPI.getMatchList(ValorantShard.EU, account.getPUUID());
    matchlist.forEach(m -> {
        VALMatch match = matchAPI.getMatch(ValorantShard.EU, m.getMatchId());
        match.getRoundResults().forEach(r -> {
            if (match.getPlayers().stream().anyMatch(p -> p.getCharacter() == null)) {
                System.out.println();
            }
            r.getPlayerStats().forEach(s -> {
                if (s.getAbility().getGrenadeEffects() != null && !s.getAbility().getGrenadeEffects().equals("null")) {
                    System.out.println();
                }
            });
        });
        match.getPlayers().forEach(p -> ids.add(p.getPUUID()));
    });
    ids.forEach(puuid -> {
        List<MatchReference> matches = matchAPI.getMatchList(ValorantShard.EU, puuid);
        matches.forEach(m -> {
            VALMatch match = matchAPI.getMatch(ValorantShard.EU, m.getMatchId());
            match.getRoundResults().forEach(r -> {
                r.getPlayerStats().forEach(s -> {
                    if (s.getAbility().getGrenadeEffects() != null && !s.getAbility().getGrenadeEffects().equals("null")) {
                        System.out.println();
                    }
                });
            });
        });
    });
}
Also used : RiotAccount(no.stelar7.api.r4j.pojo.shared.RiotAccount) VALMatchAPI(no.stelar7.api.r4j.impl.val.VALMatchAPI) R4J(no.stelar7.api.r4j.impl.R4J)

Example 17 with R4J

use of no.stelar7.api.r4j.impl.R4J in project L4J8 by stelar7.

the class TestSharedAccount method getByTag.

@Test
@Order(1)
public void getByTag() {
    R4J api = new R4J(SecretFile.CREDS);
    RiotAccount account = api.getAccountAPI().getAccountByTag(RegionShard.EUROPE, "stelar7", "STL7");
    System.out.println(account);
}
Also used : R4J(no.stelar7.api.r4j.impl.R4J)

Example 18 with R4J

use of no.stelar7.api.r4j.impl.R4J in project L4J8 by stelar7.

the class TestSharedAccount method getByPUUID.

@Test
@Order(2)
public void getByPUUID() {
    R4J api = new R4J(SecretFile.CREDS);
    RiotAccount accountTag = api.getAccountAPI().getAccountByTag(RegionShard.EUROPE, "stelar7", "STL7");
    RiotAccount account = api.getAccountAPI().getAccountByPUUID(RegionShard.EUROPE, accountTag.getPUUID());
    System.out.println(account);
}
Also used : R4J(no.stelar7.api.r4j.impl.R4J)

Example 19 with R4J

use of no.stelar7.api.r4j.impl.R4J in project L4J8 by stelar7.

the class StatusTest method testNullInit.

@Test
public void testNullInit() {
    final R4J r4J = new R4J(null);
    r4J.getDDragonAPI().getRealm();
}
Also used : R4J(no.stelar7.api.r4j.impl.R4J) Test(org.junit.jupiter.api.Test)

Example 20 with R4J

use of no.stelar7.api.r4j.impl.R4J in project L4J8 by stelar7.

the class TestVALRanked method getLeaderboard.

@Test
public void getLeaderboard() {
    R4J api = new R4J(SecretFile.CREDS);
    VALRankedAPI ranked = api.getVALAPI().getRankedAPI();
    Leaderboard leaderboard = ranked.getLeaderboard(ValorantShard.EU, Season.EPISODE_2_ACT_1.getActId(), 0, 200);
    System.out.println(leaderboard);
}
Also used : Leaderboard(no.stelar7.api.r4j.pojo.val.ranked.Leaderboard) VALRankedAPI(no.stelar7.api.r4j.impl.val.VALRankedAPI) R4J(no.stelar7.api.r4j.impl.R4J) Test(org.junit.jupiter.api.Test)

Aggregations

R4J (no.stelar7.api.r4j.impl.R4J)20 VALMatchAPI (no.stelar7.api.r4j.impl.val.VALMatchAPI)6 Summoner (no.stelar7.api.r4j.pojo.lol.summoner.Summoner)6 Test (org.junit.jupiter.api.Test)5 RiotAccount (no.stelar7.api.r4j.pojo.shared.RiotAccount)4 SpectatorBuilder (no.stelar7.api.r4j.impl.lol.builders.spectator.SpectatorBuilder)3 SummonerBuilder (no.stelar7.api.r4j.impl.lol.builders.summoner.SummonerBuilder)3 SpectatorGameInfo (no.stelar7.api.r4j.pojo.lol.spectator.SpectatorGameInfo)3 FileSystemCacheProvider (no.stelar7.api.r4j.basic.cache.impl.FileSystemCacheProvider)2 LeagueShard (no.stelar7.api.r4j.basic.constants.api.regions.LeagueShard)2 StaticChampion (no.stelar7.api.r4j.pojo.lol.staticdata.champion.StaticChampion)2 java.util (java.util)1 Collectors (java.util.stream.Collectors)1 DataCall (no.stelar7.api.r4j.basic.calling.DataCall)1 URLEndpoint (no.stelar7.api.r4j.basic.constants.api.URLEndpoint)1 VALContentAPI (no.stelar7.api.r4j.impl.val.VALContentAPI)1 VALRankedAPI (no.stelar7.api.r4j.impl.val.VALRankedAPI)1 ChampionMastery (no.stelar7.api.r4j.pojo.lol.championmastery.ChampionMastery)1 no.stelar7.api.r4j.pojo.lol.match.v5 (no.stelar7.api.r4j.pojo.lol.match.v5)1 StaticMastery (no.stelar7.api.r4j.pojo.lol.staticdata.mastery.StaticMastery)1