public static Region getRegionByName(String name) throws RiotStringNotFoundException { for (Region region : Region.values()) { if (region.getName().equals(name.toLowerCase())) { return region; } } RiotApi.log.warning("Unknown region: " + name); throw new RiotStringNotFoundException("Could not find region " + name); }
public GetLeagueEntryBySummoners(ApiConfig config, Region region, String summonerIds) { super(config); setRegion(region); setReturnType(new TypeToken<Map<String, List<League>>>() {}.getType()); setUrlBase(region.getEndpoint() + "/v2.5/league/by-summoner/" + summonerIds + "/entry"); addApiKeyParameter(); }