updated MatchService.java
This commit is contained in:
parent
fa0ba1343d
commit
27f643b6fa
@ -1,5 +1,6 @@
|
|||||||
package eu.sekunity.riot.service;
|
package eu.sekunity.riot.service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import eu.sekunity.riot.core.RiotHttpClient;
|
import eu.sekunity.riot.core.RiotHttpClient;
|
||||||
@ -18,10 +19,18 @@ import lombok.RequiredArgsConstructor;
|
|||||||
public final class MatchService {
|
public final class MatchService {
|
||||||
private final RiotHttpClient client;
|
private final RiotHttpClient client;
|
||||||
|
|
||||||
public String[] listMatchIdsByPuuid(String puuid, int start, int count) {
|
public String[] listMatchIdsByPuuid(String puuid, int start, int count, Integer queueId) {
|
||||||
|
Map<String, String> params = new HashMap<>();
|
||||||
|
params.put("start", String.valueOf(start));
|
||||||
|
params.put("count", String.valueOf(count));
|
||||||
|
|
||||||
|
if (queueId != null) {
|
||||||
|
params.put("queue", String.valueOf(queueId));
|
||||||
|
}
|
||||||
|
|
||||||
return client.getRegional(
|
return client.getRegional(
|
||||||
"/lol/match/v5/matches/by-puuid/" + puuid + "/ids",
|
"/lol/match/v5/matches/by-puuid/" + puuid + "/ids",
|
||||||
Map.of("start", String.valueOf(start), "count", String.valueOf(count)),
|
params,
|
||||||
String[].class
|
String[].class
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user