Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.robrua.orianna.api.dto;
  
  import java.util.Arrays;
  import java.util.List;
  import java.util.Map;
  
 
 public abstract class SummonerAPI {
    

Parameters:
summonerIDs the IDs of the summoners to get
Returns:
the summoners
See also:
Riot API Specification
 
     public static Map<LongSummonergetSummonersByID(final List<LongsummonerIDs) {
         if(summonerIDs.size() > 40) {
             throw new IllegalArgumentException("Can only get up to 40 summoners at a time!");
         }
 
         final String request = ..get("summoner") + "/summoner/" + Utils.getIDString(summonerIDs);
         final Type type = new TypeToken<Map<LongSummoner>>() {}.getType();
         return ..fromJson(BaseRiotAPI.get(requestnullfalse), type);
     }

    

Parameters:
summonerIDs the IDs of the summoners to get
Returns:
the summoners
See also:
Riot API Specification
 
     public static Map<LongSummonergetSummonersByID(final long... summonerIDs) {
         return getSummonersByID(Utils.convert(summonerIDs));
     }

    

Parameters:
summonerNames the names of the summoners to get
Returns:
the summoners
See also:
Riot API Specification
 
     public static Map<StringSummonergetSummonersByName(final List<StringsummonerNames) {
         if(summonerNames.size() > 40) {
             throw new IllegalArgumentException("Can only get up to 40 summoners at a time!");
         }
 
         final String request = ..get("summoner") + "/summoner/by-name/" + Utils.getIDString(summonerNames);
         final Type type = new TypeToken<Map<StringSummoner>>() {}.getType();
         return ..fromJson(BaseRiotAPI.get(requestnullfalse), type);
     }

    

Parameters:
summonerNames the names of the summoners to get
Returns:
the summoners
See also:
Riot API Specification
 
     public static Map<StringSummonergetSummonersByName(final String... summonerNames) {
         return getSummonersByName(Arrays.asList(summonerNames));
     }

    

Parameters:
summonerIDs the IDs of the summoners to get masteries for
Returns:
the summoners' masteries
See also:
Riot API Specification
 
     public static Map<LongMasteryPagesgetSummonersMasteries(final List<LongsummonerIDs) {
         if(summonerIDs.size() > 40) {
             throw new IllegalArgumentException("Can only get up to 40 summoners' masteries at a time!");
         }
 
         final String request = ..get("summoner") + "/summoner/" + Utils.getIDString(summonerIDs) + "/masteries";
         final Type type = new TypeToken<Map<LongMasteryPages>>() {}.getType();
         return ..fromJson(BaseRiotAPI.get(requestnullfalse), type);
     }

    

Parameters:
summonerIDs the IDs of the summoners to get masteries for
Returns:
the summoners' masteries
See also:
Riot API Specification
    public static Map<LongMasteryPagesgetSummonersMasteries(final long... summonerIDs) {
        return getSummonersMasteries(Utils.convert(summonerIDs));
    }

    

Parameters:
summonerIDs the IDs of the summoners to get names of
Returns:
the summoners' names
See also:
Riot API Specification
    public static Map<LongStringgetSummonersNames(final List<LongsummonerIDs) {
        if(summonerIDs.size() > 40) {
            throw new IllegalArgumentException("Can only get up to 40 summoner names at a time!");
        }
        final String request = ..get("summoner") + "/summoner/" + Utils.getIDString(summonerIDs) + "/name";
        final Type type = new TypeToken<Map<LongString>>() {}.getType();
        return ..fromJson(BaseRiotAPI.get(requestnullfalse), type);
    }

    

Parameters:
summonerIDs the IDs of the summoners to get names of
Returns:
the summoners' names
See also:
Riot API Specification
    public static Map<LongStringgetSummonersNames(final long... summonerIDs) {
        return getSummonersNames(Utils.convert(summonerIDs));
    }

    

Parameters:
summonerIDs the IDs of the summoners to get runes for
Returns:
the summoners' runes
See also:
Riot API Specification
    public static Map<LongRunePagesgetSummonersRunes(final List<LongsummonerIDs) {
        if(summonerIDs.size() > 40) {
            throw new IllegalArgumentException("Can only get up to 40 summoners' runes at a time!");
        }
        final String request = ..get("summoner") + "/summoner/" + Utils.getIDString(summonerIDs) + "/runes";
        final Type type = new TypeToken<Map<LongRunePages>>() {}.getType();
        return ..fromJson(BaseRiotAPI.get(requestnullfalse), type);
    }

    

Parameters:
summonerIDs the IDs of the summoners to get runes for
Returns:
the summoners' runes
See also:
Riot API Specification
    public static Map<LongRunePagesgetSummonersRunes(final long... summonerIDs) {
        return getSummonersRunes(Utils.convert(summonerIDs));
    }
New to GrepCode? Check out our FAQ X