com.robrua.orianna.api.dto.SummonerAPI Maven / Gradle / Ivy
package com.robrua.orianna.api.dto;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.google.gson.reflect.TypeToken;
import com.robrua.orianna.api.Utils;
import com.robrua.orianna.type.dto.summoner.MasteryPages;
import com.robrua.orianna.type.dto.summoner.RunePages;
import com.robrua.orianna.type.dto.summoner.Summoner;
public abstract class SummonerAPI {
/**
* @param summonerIDs
* the IDs of the summoners to get
* @return the summoners
* @see Riot
* API Specification
*/
public static Map getSummonersByID(final List summonerIDs) {
if(summonerIDs.size() > 40) {
throw new IllegalArgumentException("Can only get up to 40 summoners at a time!");
}
final String request = BaseRiotAPI.API_VERSIONS.get("summoner") + "/summoner/" + Utils.getIDString(summonerIDs);
final Type type = new TypeToken