use of no.stelar7.api.r4j.impl.val.VALMatchAPI 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();
}
});
});
});
});
}
Aggregations