public class RiotApi
extends java.lang.Object
implements java.lang.Cloneable
Here is an example of how RiotApi is used:
ApiConfig config = new ApiConfig().setKey("YOUR-API-KEY-HERE"); RiotApi api = new RiotApi(config); Summoner summoner = api.getSummonerByName(Platform.NA, "Tryndamere"); // Gets a Summoner object for the summoner Tryndamere on NA
To fire asynchronous api calls, you need an instance of RiotApiAsync
, which you can get by calling getAsyncApi()
.
ApiConfig
,
RiotApiAsync
Modifier and Type | Field and Description |
---|---|
static java.util.logging.Logger |
log |
Constructor and Description |
---|
RiotApi()
Constructs a RiotApi object with default configuration.
|
RiotApi(ApiConfig config)
Constructs a RiotApi object with the given configuration.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
callCustomApiMethod(ApiMethod method)
Call a custom
ApiMethod |
RiotApi |
clone() |
int |
createTournament(int providerId)
Creates a tournament and returns its ID.
|
int |
createTournament(java.lang.String tournamentName,
int providerId)
Creates a tournament and returns its ID.
|
java.util.List<java.lang.String> |
createTournamentCodes(int tournamentId,
int count,
int teamSize,
TournamentMap mapType,
PickType pickType,
SpectatorType spectatorType,
long... allowedSummonerIds)
Create tournament codes for the given tournament.
|
java.util.List<java.lang.String> |
createTournamentCodes(int tournamentId,
int count,
int teamSize,
TournamentMap mapType,
PickType pickType,
SpectatorType spectatorType,
java.lang.String metaData,
long... allowedSummonerIds)
Create tournament codes for the given tournament.
|
int |
createTournamentProvider(java.lang.String region,
java.lang.String callbackUrl)
Creates a tournament provider and returns its ID.
|
CurrentGameInfo |
getActiveGameBySummoner(Platform platform,
long summonerId)
Get current game information for the given summoner ID.
|
RiotApiAsync |
getAsyncApi()
Provides a RiotApiAsync object to use for asynchronous api calls.
|
LeagueList |
getChallengerLeagueByQueue(Platform platform,
LeagueQueue queue)
Get the challenger league for a given
queue . |
LeagueList |
getChallengerLeagueByQueue(Platform platform,
java.lang.String queue)
Get the challenger league for a given
queue . |
Champion |
getChampion(Platform platform,
int id)
Retrieve champion by
id . |
java.util.List<ChampionMastery> |
getChampionMasteriesBySummoner(Platform platform,
long summonerId)
Get all champion mastery entries sorted by number of champion points descending
|
ChampionMastery |
getChampionMasteriesBySummonerByChampion(Platform platform,
long summonerId,
int championId)
Get a champion mastery by
summonerId and championId . |
int |
getChampionMasteryScoresBySummoner(Platform platform,
long summonerId)
Get a player's total champion mastery score, which is sum of individual champion mastery levels
|
ChampionList |
getChampions(Platform platform)
Retrieve all champions.
|
ChampionList |
getChampions(Platform platform,
boolean freeToPlay)
Retrieve all champions.
|
Champion |
getDataChampion(Platform platform,
int id)
Retrieves a champion by
id . |
Champion |
getDataChampion(Platform platform,
int id,
Locale locale,
java.lang.String version,
ChampionTags... tags)
Retrieves a champion by
id . |
ChampionList |
getDataChampionList(Platform platform)
Retrieves champion list.
|
ChampionList |
getDataChampionList(Platform platform,
Locale locale,
java.lang.String version,
boolean dataById,
ChampionListTags... tags)
Retrieves champion list.
|
Item |
getDataItem(Platform platform,
int id)
Retrieves item by
id . |
Item |
getDataItem(Platform platform,
int id,
Locale locale,
java.lang.String version,
ItemTags... tags)
Retrieves item by
id . |
ItemList |
getDataItemList(Platform platform)
Retrieves item list.
|
ItemList |
getDataItemList(Platform platform,
Locale locale,
java.lang.String version,
ItemListTags... tags)
Retrieves item list.
|
java.util.List<java.lang.String> |
getDataLanguages(Platform platform)
Retrieve supported languages data.
|
LanguageStrings |
getDataLanguageStrings(Platform platform)
Retrieve language strings data.
|
LanguageStrings |
getDataLanguageStrings(Platform platform,
Locale locale,
java.lang.String version)
Retrieve language strings data.
|
MapData |
getDataMaps(Platform platform)
Retrieves map data.
|
MapData |
getDataMaps(Platform platform,
Locale locale,
java.lang.String version)
Retrieves map data.
|
Mastery |
getDataMastery(Platform platform,
int id)
Retrieves mastery item by
id . |
Mastery |
getDataMastery(Platform platform,
int id,
Locale locale,
java.lang.String version,
MasteryTags... tags)
Retrieves mastery item by
id . |
MasteryList |
getDataMasteryList(Platform platform)
Retrieves mastery list.
|
MasteryList |
getDataMasteryList(Platform platform,
Locale locale,
java.lang.String version,
MasteryListTags... tags)
Retrieves mastery list.
|
ProfileIconData |
getDataProfileIcons(Platform platform)
Retrieve profile icons.
|
ProfileIconData |
getDataProfileIcons(Platform platform,
Locale locale,
java.lang.String version)
Retrieve profile icons.
|
Realm |
getDataRealm(Platform platform)
Retrieve realm data.
|
Rune |
getDataRune(Platform platform,
int id)
Retrieves rune by
id . |
Rune |
getDataRune(Platform platform,
int id,
Locale locale,
java.lang.String version,
RuneTags... tags)
Retrieves rune by
id . |
RuneList |
getDataRuneList(Platform platform)
Retrieves rune list.
|
RuneList |
getDataRuneList(Platform platform,
Locale locale,
java.lang.String version,
RuneListTags... tags)
Retrieves rune list.
|
SummonerSpell |
getDataSummonerSpell(Platform platform,
int id)
Retrieves summoner spell by
id . |
SummonerSpell |
getDataSummonerSpell(Platform platform,
int id,
Locale locale,
java.lang.String version,
SpellTags... tags)
Retrieves summoner spell by
id . |
SummonerSpellList |
getDataSummonerSpellList(Platform platform)
Retrieves summoner spell list.
|
SummonerSpellList |
getDataSummonerSpellList(Platform platform,
Locale locale,
java.lang.String version,
boolean dataById,
SpellListTags... tags)
Retrieves summoner spell list.
|
java.util.List<java.lang.String> |
getDataVersions(Platform platform)
Retrieve version data.
|
FeaturedGames |
getFeaturedGames(Platform platform)
Get list of featured games.
|
java.util.Set<LeaguePosition> |
getLeaguePositionsBySummonerId(Platform platform,
long summonerId)
Get league positions in all queues for a given
summonerId . |
java.util.List<LeagueList> |
getLeaguesBySummonerId(Platform platform,
long summonerId)
Get leagues in all queues for a given
summonerId . |
LobbyEventWrapper |
getLobbyEventsByTournament(java.lang.String tournamentCode)
Gets a list of lobby events by
tournamentCode |
MasteryPages |
getMasteriesBySummoner(Platform platform,
long summonerId)
Get mastery pages for a given
summonerId . |
LeagueList |
getMasterLeagueByQueue(Platform platform,
LeagueQueue queue)
Get the master league for a given
queue . |
LeagueList |
getMasterLeagueByQueue(Platform platform,
java.lang.String queue)
Get the master league for a given
queue . |
Match |
getMatch(Platform platform,
long matchId)
Get match by
matchId . |
Match |
getMatch(Platform platform,
long matchId,
long forAccountId)
Get match by
matchId . |
Match |
getMatchByMatchIdAndTournamentCode(Platform platform,
long matchId,
java.lang.String tournamentCode)
Retrieve match by
matchId and tournamentCode . |
java.util.List<java.lang.Long> |
getMatchIdsByTournamentCode(Platform platform,
java.lang.String tournamentCode)
Retrieve match IDs by
tournamentCode . |
MatchList |
getMatchListByAccountId(Platform platform,
long accountId)
Get matchlist for given account ID and platform ID.
|
MatchList |
getMatchListByAccountId(Platform platform,
long accountId,
java.util.Set<java.lang.Integer> champion,
java.util.Set<java.lang.Integer> queue,
java.util.Set<java.lang.Integer> season)
Get matchlist for given account ID and platform ID.
|
MatchList |
getMatchListByAccountId(Platform platform,
long accountId,
java.util.Set<java.lang.Integer> champion,
java.util.Set<java.lang.Integer> queue,
java.util.Set<java.lang.Integer> season,
long beginTime,
long endTime,
int beginIndex,
int endIndex)
Get matchlist for given account ID and platform ID.
|
MatchList |
getRecentMatchListByAccountId(Platform platform,
long accountId)
Deprecated.
|
RunePages |
getRunesBySummoner(Platform platform,
long summonerId)
Get rune pages for a given
summonerId . |
ShardStatus |
getShardData(Platform platform)
Get shard status.
|
Summoner |
getSummoner(Platform platform,
long summonerId)
Get a summoner object for a given
summonerId . |
Summoner |
getSummonerByAccount(Platform platform,
long accountId)
Get a summoner object for a given
accountId . |
Summoner |
getSummonerByName(Platform platform,
java.lang.String summonerName)
Get a single summoner object for a given
summonerName . |
MatchTimeline |
getTimelineByMatchId(Platform platform,
long matchId)
Get match timeline by
matchId . |
TournamentCode |
getTournamentCode(java.lang.String tournamentCode)
Returns the tournament code DTO associated with a
tournamentCode . |
void |
updateTournamentCode(java.lang.String tournamentCode,
TournamentMap mapType,
PickType pickType,
SpectatorType spectatorType,
long... allowedSummonerIds)
Update the pick type, map, spectator type, or allowed summoners for a code.
|
public RiotApi()
public java.lang.Object callCustomApiMethod(ApiMethod method) throws RiotApiException
ApiMethod
method
- Custom ApiMethod
objectjava.lang.NullPointerException
- If method
is null
RiotApiException
- If the API returns an error or unparsable resultpublic RiotApi clone()
clone
in class java.lang.Object
public int createTournament(java.lang.String tournamentName, int providerId) throws RiotApiException
tournamentName
- The optional name of the tournament.providerId
- The provider ID to specify the regional registered provider data to associate this tournament.RiotApiException
- If the API returns an error or unparsable resultpublic int createTournament(int providerId) throws RiotApiException
providerId
- The provider ID to specify the regional registered provider data to associate this tournament.RiotApiException
- If the API returns an error or unparsable resultpublic java.util.List<java.lang.String> createTournamentCodes(int tournamentId, int count, int teamSize, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, java.lang.String metaData, long... allowedSummonerIds) throws RiotApiException
tournamentId
- The tournament IDcount
- The number of codes to create (max 1000)teamSize
- The team size of the game. Valid values are 1-5.mapType
- The map type of the game.pickType
- The pick type of the game.spectatorType
- The spectator type of the game.metaData
- Optional string that may contain any data in any format, if specified at all. Used to denote any custom information about
the game.allowedSummonerIds
- Optional list of participants in order to validate the players eligible to join the lobby.java.lang.NullPointerException
- If mapType
or pickType
or spectatorType
is null
RiotApiException
- If the API returns an error or unparsable resultpublic java.util.List<java.lang.String> createTournamentCodes(int tournamentId, int count, int teamSize, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, long... allowedSummonerIds) throws RiotApiException
tournamentId
- The tournament IDcount
- The number of codes to create (max 1000)teamSize
- The team size of the game. Valid values are 1-5.mapType
- The map type of the game.pickType
- The pick type of the game.spectatorType
- The spectator type of the game.allowedSummonerIds
- Optional list of participants in order to validate the players eligible to join the lobby.java.lang.NullPointerException
- If mapType
or pickType
or spectatorType
is null
RiotApiException
- If the API returns an error or unparsable resultpublic int createTournamentProvider(java.lang.String region, java.lang.String callbackUrl) throws RiotApiException
region
- The region in which the provider will be running tournaments.callbackUrl
- The provider's callback URL to which tournament game results in this region should be posted. (http URLs must use port 80,
https URLs must use port 443).java.lang.NullPointerException
- If region
or callbackUrl
is null
RiotApiException
- If the API returns an error or unparsable resultpublic CurrentGameInfo getActiveGameBySummoner(Platform platform, long summonerId) throws RiotApiException
platform
- Platform to execute the method call against.summonerId
- The ID of the summoner.java.lang.NullPointerException
- If platform
or summonerId
is null
RiotApiException
- If the API returns an error or unparsable resultCurrentGameInfo
public RiotApiAsync getAsyncApi()
RiotApiAsync
public LeagueList getChallengerLeagueByQueue(Platform platform, java.lang.String queue) throws RiotApiException
queue
.platform
- Platform to execute the method call against.queue
- Game queue type.java.lang.NullPointerException
- If platform
or queue
is null
RiotApiException
- If the API returns an error or unparsable resultLeagueList
public LeagueList getChallengerLeagueByQueue(Platform platform, LeagueQueue queue) throws RiotApiException
queue
.platform
- Platform to execute the method call against.queue
- Game queue type.java.lang.NullPointerException
- If queue
is null
RiotApiException
- If the API returns an error or unparsable resultLeagueList
public Champion getChampion(Platform platform, int id) throws RiotApiException
id
.platform
- Platform to execute the method call against.id
- The ID of the desired championjava.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultChampion
public java.util.List<ChampionMastery> getChampionMasteriesBySummoner(Platform platform, long summonerId) throws RiotApiException
platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with the playerjava.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultChampionMastery
public ChampionMastery getChampionMasteriesBySummonerByChampion(Platform platform, long summonerId, int championId) throws RiotApiException
summonerId
and championId
.platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with the playerchampionId
- Champion ID to retrieve Champion Mastery fornull
if given player has no mastery for given champion.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultChampionMastery
public int getChampionMasteryScoresBySummoner(Platform platform, long summonerId) throws RiotApiException
platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with the playerjava.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultpublic ChampionList getChampions(Platform platform, boolean freeToPlay) throws RiotApiException
platform
- Platform to execute the method call against.freeToPlay
- Optional filter param to retrieve only free to play champions.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultChampionList
public ChampionList getChampions(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultChampionList
public Champion getDataChampion(Platform platform, int id, Locale locale, java.lang.String version, ChampionTags... tags) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Champion IDlocale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only id
, key
, name
, and title
are returned by default if
this parameter isn't specified. To return all additional data, use ChampionTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultChampion
public Champion getDataChampion(Platform platform, int id) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Champion IDRiotApiException
- If the API returns an error or unparsable resultChampion
public ChampionList getDataChampionList(Platform platform, Locale locale, java.lang.String version, boolean dataById, ChampionListTags... tags) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.dataById
- If specified as true, the returned data map will use the champions' IDs as the keys. If specified as false, the returned
data map will use the champions' keys instead.tags
- Tags to return additional data. Only id
, key
, name
, and title
are returned by default if
this parameter isn't specified. To return all additional data, use ChampionListTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultChampionList
public ChampionList getDataChampionList(Platform platform) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultChampionList
public Item getDataItem(Platform platform, int id, Locale locale, java.lang.String version, ItemTags... tags) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Item IDlocale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only type
, version
, basic
, data
, id
, name
,
plaintext
, group
, and description
are returned by default if this parameter isn't specified. To
return all additional data, use ItemTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultItem
public Item getDataItem(Platform platform, int id) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Item IDRiotApiException
- If the API returns an error or unparsable resultItem
public ItemList getDataItemList(Platform platform, Locale locale, java.lang.String version, ItemListTags... tags) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only type
, version
, basic
, data
, id
, name
,
plaintext
, group
, and description
are returned by default if this parameter isn't specified. To
return all additional data, use ItemListTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultItemList
public ItemList getDataItemList(Platform platform) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultItemList
public java.util.List<java.lang.String> getDataLanguages(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultpublic LanguageStrings getDataLanguageStrings(Platform platform, Locale locale, java.lang.String version) throws RiotApiException
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultLanguageStrings
public LanguageStrings getDataLanguageStrings(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultLanguageStrings
public MapData getDataMaps(Platform platform, Locale locale, java.lang.String version) throws RiotApiException
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMapData
public MapData getDataMaps(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultMapData
public Mastery getDataMastery(Platform platform, int id, Locale locale, java.lang.String version, MasteryTags... tags) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Mastery IDlocale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only id
, name
, and description
are returned by default if this
parameter isn't specified. To return all additional data, use MasteryTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMastery
public Mastery getDataMastery(Platform platform, int id) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Mastery IDRiotApiException
- If the API returns an error or unparsable resultMastery
public MasteryList getDataMasteryList(Platform platform, Locale locale, java.lang.String version, MasteryListTags... tags) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only type
, version
, data
, id
, name
, and
description
are returned by default if this parameter isn't specified. To return all additional data, use
MasteryListTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMasteryList
public MasteryList getDataMasteryList(Platform platform) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultMasteryList
public ProfileIconData getDataProfileIcons(Platform platform, Locale locale, java.lang.String version) throws RiotApiException
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultProfileIconData
public ProfileIconData getDataProfileIcons(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.RiotApiException
ProfileIconData
public Realm getDataRealm(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultRealm
public Rune getDataRune(Platform platform, int id, Locale locale, java.lang.String version, RuneTags... tags) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Rune IDlocale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only id
, name
, rune
, and description
are returned by
default if this parameter isn't specified. To return all additional data, use RuneTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultRune
public Rune getDataRune(Platform platform, int id) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Rune IDRiotApiException
- If the API returns an error or unparsable resultRune
public RuneList getDataRuneList(Platform platform, Locale locale, java.lang.String version, RuneListTags... tags) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only type
, version
, data
, id
, name
, rune
,
and description
are returned by default if this parameter isn't specified. To return all additional data, use
RuneListTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultRuneList
public RuneList getDataRuneList(Platform platform) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultRuneList
public SummonerSpell getDataSummonerSpell(Platform platform, int id, Locale locale, java.lang.String version, SpellTags... tags) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Summoner spell IDlocale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.tags
- Tags to return additional data. Only id
, key
, name
, description
, and summonerLevel
are returned by default if this parameter isn't specified. To return all additional data, use SpellTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultSummonerSpell
public SummonerSpell getDataSummonerSpell(Platform platform, int id) throws RiotApiException
id
.
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.id
- Summoner spell IDRiotApiException
- If the API returns an error or unparsable resultSummonerSpell
public SummonerSpellList getDataSummonerSpellList(Platform platform, Locale locale, java.lang.String version, boolean dataById, SpellListTags... tags) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.locale
- Locale code for returned data (e.g., en_US
, es_ES
). If not specified, the default locale for the region is
used.version
- Data dragon version for returned data. If not specified, the latest version for the region is used. List of valid versions
can be obtained from the #getDataVersions()
method.dataById
- If specified as true, the returned data map will use the spells' IDs as the keys. If specified as false, the returned data
map will use the spells' keys insteadtags
- Tags to return additional data. Only type
, version
, data
, id
, key
, name
,
description
, and summonerLevel
are returned by default if this parameter isn't specified. To return all
additional data, use SpellListTags.ALL
.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultSummonerSpellList
public SummonerSpellList getDataSummonerSpellList(Platform platform) throws RiotApiException
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.RiotApiException
- If the API returns an error or unparsable resultSummonerSpellList
public java.util.List<java.lang.String> getDataVersions(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultpublic FeaturedGames getFeaturedGames(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultFeaturedGames
public java.util.Set<LeaguePosition> getLeaguePositionsBySummonerId(Platform platform, long summonerId) throws RiotApiException
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner IDjava.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultLeagueList
public java.util.List<LeagueList> getLeaguesBySummonerId(Platform platform, long summonerId) throws RiotApiException
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner IDjava.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultLeagueList
public LobbyEventWrapper getLobbyEventsByTournament(java.lang.String tournamentCode) throws RiotApiException
tournamentCode
tournamentCode
- Tournament code used to enter the lobby.java.lang.NullPointerException
- If tournamentCode
is null
RiotApiException
- If the API returns an error or unparsable resultLobbyEventWrapper
public LeagueList getMasterLeagueByQueue(Platform platform, java.lang.String queue) throws RiotApiException
queue
.platform
- Platform to execute the method call against.queue
- Game queue type.java.lang.NullPointerException
- If platform
or queue
is null
RiotApiException
- If the API returns an error or unparsable resultLeagueList
public LeagueList getMasterLeagueByQueue(Platform platform, LeagueQueue queue) throws RiotApiException
queue
.platform
- Platform to execute the method call against.queue
- Game queue type.RiotApiException
- If the API returns an error or unparsable resultjava.lang.NullPointerException
- If queue
is null
LeagueList
public MasteryPages getMasteriesBySummoner(Platform platform, long summonerId) throws RiotApiException
summonerId
.platform
- Platform to execute the method call against.summonerIds
- Summoner ID associated with masteries to retrieve.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMasteryPages
public Match getMatch(Platform platform, long matchId, long forAccountId) throws RiotApiException
matchId
.platform
- Platform to execute the method call against.matchId
- The ID of the match.forAccountId
- If provided, used to identify the participant to be unobfuscated.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMatch
public Match getMatch(Platform platform, long matchId) throws RiotApiException
matchId
.platform
- Platform to execute the method call against.matchId
- The ID of the match.RiotApiException
- If the API returns an error or unparsable resultMatch
public Match getMatchByMatchIdAndTournamentCode(Platform platform, long matchId, java.lang.String tournamentCode) throws RiotApiException
matchId
and tournamentCode
.platform
- Platform to execute the method call against.matchId
- The ID of the match.tournamentCode
- The code of the tournament.java.lang.NullPointerException
- If platform
or tournamentCode
is null
RiotApiException
- If the API returns an error or unparsable resultMatch
public java.util.List<java.lang.Long> getMatchIdsByTournamentCode(Platform platform, java.lang.String tournamentCode) throws RiotApiException
tournamentCode
.platform
- Platform to execute the method call against.tournamentCode
- The code of the tournament.java.lang.NullPointerException
- If platform
or tournamentCode
is null
RiotApiException
- If the API returns an error or unparsable resultpublic MatchList getMatchListByAccountId(Platform platform, long accountId, java.util.Set<java.lang.Integer> champion, java.util.Set<java.lang.Integer> queue, java.util.Set<java.lang.Integer> season, long beginTime, long endTime, int beginIndex, int endIndex) throws RiotApiException
platform
- Platform to execute the method call against.accountId
- The account ID of the summoner.champion
- Set of champion IDs for which to filtering matchlist.queue
- Set of queue IDs for which to filtering matchlist.season
- Set of season IDs for which to filtering matchlist.beginTime
- The begin time to use for filtering matchlist specified as epoch milliseconds. Use -1
to not use this parameter.endTime
- The end time to use for filtering matchlist specified as epoch milliseconds. Use -1
to not use this parameter.beginIndex
- The begin index to use for filtering matchlist. Use -1
to not use this parameter.endIndex
- The end index to use for filtering matchlist. Use -1
to not use this parameter.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMatchList
public MatchList getMatchListByAccountId(Platform platform, long accountId, java.util.Set<java.lang.Integer> champion, java.util.Set<java.lang.Integer> queue, java.util.Set<java.lang.Integer> season) throws RiotApiException
platform
- Platform to execute the method call against.accountId
- The account ID of the summoner.champion
- Set of champion IDs for which to filtering matchlist.queue
- Set of queue IDs for which to filtering matchlist.season
- Set of season IDs for which to filtering matchlist.RiotApiException
- If the API returns an error or unparsable resultMatchList
public MatchList getMatchListByAccountId(Platform platform, long accountId) throws RiotApiException
platform
- Platform to execute the method call against.accountId
- The account ID of the summoner.RiotApiException
- If the API returns an error or unparsable resultMatchList
@Deprecated public MatchList getRecentMatchListByAccountId(Platform platform, long accountId) throws RiotApiException
platform
- Platform to execute the method call against.accountId
- The account ID of the summoner.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMatchList
public RunePages getRunesBySummoner(Platform platform, long summonerId) throws RiotApiException
summonerId
.platform
- Platform to execute the method call against.summonerIds
- Summoner ID associated with runes to retrieve.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultRunePages
public ShardStatus getShardData(Platform platform) throws RiotApiException
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultShardStatus
public Summoner getSummonerByAccount(Platform platform, long accountId) throws RiotApiException
accountId
.platform
- Platform to execute the method call against.accountId
- Account ID associated with summoner to retrieve.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultSummoner
public Summoner getSummoner(Platform platform, long summonerId) throws RiotApiException
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with summoner to retrieve.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultSummoner
public Summoner getSummonerByName(Platform platform, java.lang.String summonerName) throws RiotApiException
summonerName
.platform
- Platform to execute the method call against.summonerName
- Summoner name associated with summoner to retrieve.java.lang.IllegalArgumentException
- If summonerName
is not a valid summoner namejava.lang.NullPointerException
- If platform
or summonerName
is null
RiotApiException
- If the API returns an error or unparsable resultSummoner
public MatchTimeline getTimelineByMatchId(Platform platform, long matchId) throws RiotApiException
matchId
.platform
- Platform to execute the method call against.matchId
- The ID of the match.java.lang.NullPointerException
- If platform
is null
RiotApiException
- If the API returns an error or unparsable resultMatchTimeline
public TournamentCode getTournamentCode(java.lang.String tournamentCode) throws RiotApiException
tournamentCode
.tournamentCode
- The tournament codejava.lang.NullPointerException
- If tournamentCode
is null
RiotApiException
- If the API returns an error or unparsable resultTournamentCode
public void updateTournamentCode(java.lang.String tournamentCode, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, long... allowedSummonerIds) throws RiotApiException
tournamentCode
- The tournament codemapType
- The map type of the game.pickType
- The pick type of the game.spectatorType
- The spectator type of the game.allowedSummonerIds
- Optional list of participants in order to validate the players eligible to join the lobby.java.lang.NullPointerException
- If tournamentCode
is null
RiotApiException
- If the API returns an error or unparsable result