com.robrua.orianna.api.dto.TeamAPI 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.team.Team;
public abstract class TeamAPI {
/**
* @param IDs
* the IDs of the teams
* @return the teams
* @see Riot
* API Specification
*/
public static Map getTeamsByID(final List IDs) {
if(IDs.size() > 10) {
throw new IllegalArgumentException("Can only get up to 10 teams at a time!");
}
final String request = BaseRiotAPI.API_VERSIONS.get("team") + "/team/" + Utils.getIDString(IDs);
final Type type = new TypeToken