public class RiotApiAsync
extends java.lang.Object
RiotApi.getAsyncApi()
on your
RiotApi
object.
Due to the nature of asynchronous calls, methods in this class always return an AsyncRequest
instead of the actual return type.
To get the actual return value, call AsyncRequest.getDto()
. For further information on handling asynchronous requests, see
AsyncRequest
.
ApiConfig
,
AsyncRequest
,
RiotApi
Modifier and Type | Method and Description |
---|---|
void |
addListeners(RequestListener... listeners)
Adds one or more
RequestListener to get informed when asynchronous requests finish. |
void |
awaitAll()
Waits indefinitely until all currently running and queued requests complete.
|
AsyncRequest |
callCustomApiMethod(ApiMethod method)
Call a custom
ApiMethod |
AsyncRequest |
createTournament(int providerId)
Creates a tournament and returns its ID.
|
AsyncRequest |
createTournament(java.lang.String tournamentName,
int providerId)
Creates a tournament and returns its ID.
|
AsyncRequest |
createTournamentCodes(int tournamentId,
int count,
int teamSize,
TournamentMap mapType,
PickType pickType,
SpectatorType spectatorType,
long... allowedSummonerIds)
Create tournament codes for the given tournament.
|
AsyncRequest |
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.
|
AsyncRequest |
createTournamentProvider(java.lang.String region,
java.lang.String callbackUrl)
Creates a tournament provider and returns its ID.
|
AsyncRequest |
getActiveGameBySummoner(Platform platform,
long summonerId)
Get current game information for the given summoner ID.
|
AsyncRequest |
getChallengerLeagueByQueue(Platform platform,
LeagueQueue queue)
Get the challenger league for a given
queue . |
AsyncRequest |
getChallengerLeagueByQueue(Platform platform,
java.lang.String queue)
Get the challenger league for a given
queue . |
AsyncRequest |
getChampion(Platform platform,
int id)
Retrieve champion by
id . |
AsyncRequest |
getChampionMasteriesBySummoner(Platform platform,
long summonerId)
Get all champion mastery entries sorted by number of champion points descending
|
AsyncRequest |
getChampionMasteriesBySummonerByChampion(Platform platform,
long summonerId,
int championId)
Get a champion mastery by
summonerId and championId . |
AsyncRequest |
getChampionMasteryScoresBySummoner(Platform platform,
long summonerId)
Get a player's total champion mastery score, which is sum of individual champion mastery levels
|
AsyncRequest |
getChampions(Platform platform)
Retrieve all champions.
|
AsyncRequest |
getChampions(Platform platform,
boolean freeToPlay)
Retrieve all champions.
|
AsyncRequest |
getDataChampion(Platform platform,
int id)
Retrieves a champion by
id . |
AsyncRequest |
getDataChampion(Platform platform,
int id,
Locale locale,
java.lang.String version,
ChampionTags... tags)
Retrieves a champion by
id . |
AsyncRequest |
getDataChampionList(Platform platform)
Retrieves champion list.
|
AsyncRequest |
getDataChampionList(Platform platform,
Locale locale,
java.lang.String version,
boolean dataById,
ChampionListTags... tags)
Retrieves champion list.
|
AsyncRequest |
getDataItem(Platform platform,
int id)
Retrieves item by
id . |
AsyncRequest |
getDataItem(Platform platform,
int id,
Locale locale,
java.lang.String version,
ItemTags... tags)
Retrieves item by
id . |
AsyncRequest |
getDataItemList(Platform platform)
Retrieves item list.
|
AsyncRequest |
getDataItemList(Platform platform,
Locale locale,
java.lang.String version,
ItemListTags... tags)
Retrieves item list.
|
AsyncRequest |
getDataLanguages(Platform platform)
Retrieve supported languages data.
|
AsyncRequest |
getDataLanguageStrings(Platform platform)
Retrieve language strings data.
|
AsyncRequest |
getDataLanguageStrings(Platform platform,
Locale locale,
java.lang.String version)
Retrieve language strings data.
|
AsyncRequest |
getDataMaps(Platform platform)
Retrieves map data.
|
AsyncRequest |
getDataMaps(Platform platform,
Locale locale,
java.lang.String version)
Retrieves map data.
|
AsyncRequest |
getDataMastery(Platform platform,
int id)
Retrieves mastery item by
id . |
AsyncRequest |
getDataMastery(Platform platform,
int id,
Locale locale,
java.lang.String version,
MasteryTags... tags)
Retrieves mastery item by
id . |
AsyncRequest |
getDataMasteryList(Platform platform)
Retrieves mastery list.
|
AsyncRequest |
getDataMasteryList(Platform platform,
Locale locale,
java.lang.String version,
MasteryListTags... tags)
Retrieves mastery list.
|
AsyncRequest |
getDataProfileIcons(Platform platform)
Retrieve profile icons.
|
AsyncRequest |
getDataProfileIcons(Platform platform,
Locale locale,
java.lang.String version)
Retrieve profile icons.
|
AsyncRequest |
getDataRealm(Platform platform)
Retrieve realm data.
|
AsyncRequest |
getDataRune(Platform platform,
int id)
Retrieves rune by
id . |
AsyncRequest |
getDataRune(Platform platform,
int id,
Locale locale,
java.lang.String version,
RuneTags... tags)
Retrieves rune by
id . |
AsyncRequest |
getDataRuneList(Platform platform)
Retrieves rune list.
|
AsyncRequest |
getDataRuneList(Platform platform,
Locale locale,
java.lang.String version,
RuneListTags... tags)
Retrieves rune list.
|
AsyncRequest |
getDataSummonerSpell(Platform platform,
int id)
Retrieves summoner spell by
id . |
AsyncRequest |
getDataSummonerSpell(Platform platform,
int id,
Locale locale,
java.lang.String version,
SpellTags... tags)
Retrieves summoner spell by
id . |
AsyncRequest |
getDataSummonerSpellList(Platform platform)
Retrieves summoner spell list.
|
AsyncRequest |
getDataSummonerSpellList(Platform platform,
Locale locale,
java.lang.String version,
boolean dataById,
SpellListTags... tags)
Retrieves summoner spell list.
|
AsyncRequest |
getDataVersions(Platform platform)
Retrieve version data.
|
AsyncRequest |
getFeaturedGames(Platform platform)
Get list of featured games.
|
AsyncRequest |
getLeaguePositionsBySummonerId(Platform platform,
long summonerId)
Get league positions in all queues for a given
summonerId . |
AsyncRequest |
getLeaguesBySummonerId(Platform platform,
long summonerId)
Get leagues in all queues for a given
summonerId . |
AsyncRequest |
getLobbyEventsByTournament(java.lang.String tournamentCode)
Gets a list of lobby events by
tournamentCode |
AsyncRequest |
getMasteriesBySummoner(Platform platform,
long summonerId)
Get mastery pages for a given
summonerId . |
AsyncRequest |
getMasterLeagueByQueue(Platform platform,
LeagueQueue queue)
Get the master league for a given
queue . |
AsyncRequest |
getMasterLeagueByQueue(Platform platform,
java.lang.String queue)
Get the master league for a given
queue . |
AsyncRequest |
getMatch(Platform platform,
long matchId)
Get match by
matchId . |
AsyncRequest |
getMatch(Platform platform,
long matchId,
long forAccountId)
Get match by
matchId . |
AsyncRequest |
getMatchByMatchIdAndTournamentCode(Platform platform,
long matchId,
java.lang.String tournamentCode)
Retrieve match by
matchId and tournamentCode . |
AsyncRequest |
getMatchIdsByTournamentCode(Platform platform,
java.lang.String tournamentCode)
Retrieve match IDs by
tournamentCode . |
AsyncRequest |
getMatchListByAccountId(Platform platform,
long accountId)
Get matchlist for given account ID and platform ID.
|
AsyncRequest |
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.
|
AsyncRequest |
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.
|
int |
getPoolSize()
Returns the number of elements in the asynchronous request pool.
|
int |
getQueueSize()
Returns the number of elements in the asynchronous request queue.
|
AsyncRequest |
getRecentMatchListByAccountId(Platform platform,
long accountId)
Deprecated.
|
AsyncRequest |
getRunesBySummoner(Platform platform,
long summonerId)
Get rune pages for a given
summonerId . |
AsyncRequest |
getShardData(Platform platform)
Get shard status.
|
AsyncRequest |
getSummoner(Platform platform,
long summonerId)
Get a summoner object for a given
summonerId . |
AsyncRequest |
getSummonerByAccount(Platform platform,
long accountId)
Get a summoner object for a given
accountId . |
AsyncRequest |
getSummonerByName(Platform platform,
java.lang.String summonerName)
Get a single summoner object for a given
summonerName . |
AsyncRequest |
getTimelineByMatchId(Platform platform,
long matchId)
Get match timeline by
matchId . |
AsyncRequest |
getTournamentCode(java.lang.String tournamentCode)
Returns the tournament code DTO associated with a
tournamentCode . |
void |
removeListeners(RequestListener... listeners)
Removes one or more
RequestListener from getting informed when asynchronous requests finish. |
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 void addListeners(RequestListener... listeners)
RequestListener
to get informed when asynchronous requests finish.
Please note, that by adding listeners here, you will listen to ALL asynchronous requests made with this RiotApiAsync object. To only
listen to a specific asynchronous request, you can set listeners directly in the AsyncRequest
using
AsyncRequest.addListeners(RequestListener...)
.
listeners
- One or more objects that implement RequestListener
RequestListener
public void awaitAll() throws java.lang.InterruptedException
If the thread is interrupted while waiting for the requests to complete, this method will throw an InterruptedException
and
the thread's interrupt flag will be cleared.
Please note that this method is blocking and thus negates the advantage of the asynchronous nature of this class. Consider using a
RequestListener
instead.
java.lang.InterruptedException
- If the method is interrupted by calling Thread.interrupt()
. The interrupt flag will be clearedpublic AsyncRequest 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 AsyncRequest createTournament(java.lang.String tournamentName, int providerId)
tournamentName
- The optional name of the tournament.providerId
- The provider ID to specify the regional registered provider data to associate this tournament.public AsyncRequest createTournament(int providerId)
providerId
- The provider ID to specify the regional registered provider data to associate this tournament.public AsyncRequest createTournamentCodes(int tournamentId, int count, int teamSize, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, java.lang.String metaData, long... allowedSummonerIds)
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
public AsyncRequest createTournamentCodes(int tournamentId, int count, int teamSize, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, long... allowedSummonerIds)
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.public AsyncRequest createTournamentProvider(java.lang.String region, java.lang.String callbackUrl)
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
public AsyncRequest getActiveGameBySummoner(Platform platform, long summonerId)
platform
- Platform to execute the method call against.summonerId
- The ID of the summoner.java.lang.NullPointerException
- If platform
or summonerId
is null
CurrentGameInfo
public AsyncRequest getChallengerLeagueByQueue(Platform platform, java.lang.String queue)
queue
.platform
- Platform to execute the method call against.queue
- Game queue type.java.lang.NullPointerException
- If platform
or queue
is null
LeagueList
public AsyncRequest getChallengerLeagueByQueue(Platform platform, LeagueQueue queue)
queue
.platform
- Platform to execute the method call against.queue
- Game queue type.java.lang.NullPointerException
- If queue
is null
LeagueList
public AsyncRequest getChampion(Platform platform, int id)
id
.platform
- Platform to execute the method call against.id
- The ID of the desired championjava.lang.NullPointerException
- If platform
is null
Champion
public AsyncRequest getChampionMasteriesBySummoner(Platform platform, long summonerId)
platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with the playerjava.lang.NullPointerException
- If platform
is null
ChampionMastery
public AsyncRequest getChampionMasteriesBySummonerByChampion(Platform platform, long summonerId, int championId)
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
ChampionMastery
public AsyncRequest getChampionMasteryScoresBySummoner(Platform platform, long summonerId)
platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with the playerjava.lang.NullPointerException
- If platform
is null
public AsyncRequest getChampions(Platform platform, boolean freeToPlay)
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
ChampionList
public AsyncRequest getChampions(Platform platform)
platform
- Platform to execute the method call against.ChampionList
public AsyncRequest getDataChampion(Platform platform, int id, Locale locale, java.lang.String version, ChampionTags... tags)
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
Champion
public AsyncRequest getDataChampion(Platform platform, int id)
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 IDChampion
public AsyncRequest getDataChampionList(Platform platform, Locale locale, java.lang.String version, boolean dataById, ChampionListTags... tags)
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
ChampionList
public AsyncRequest getDataChampionList(Platform platform)
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.ChampionList
public AsyncRequest getDataItem(Platform platform, int id, Locale locale, java.lang.String version, ItemTags... tags)
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
Item
public AsyncRequest getDataItem(Platform platform, int id)
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 IDItem
public AsyncRequest getDataItemList(Platform platform, Locale locale, java.lang.String version, ItemListTags... tags)
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
ItemList
public AsyncRequest getDataItemList(Platform platform)
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.ItemList
public AsyncRequest getDataLanguages(Platform platform)
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
public AsyncRequest getDataLanguageStrings(Platform platform, Locale locale, java.lang.String version)
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
LanguageStrings
public AsyncRequest getDataLanguageStrings(Platform platform)
platform
- Platform to execute the method call against.LanguageStrings
public AsyncRequest getDataMaps(Platform platform, Locale locale, java.lang.String version)
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
MapData
public AsyncRequest getDataMaps(Platform platform)
platform
- Platform to execute the method call against.MapData
public AsyncRequest getDataMastery(Platform platform, int id, Locale locale, java.lang.String version, MasteryTags... tags)
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
Mastery
public AsyncRequest getDataMastery(Platform platform, int id)
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 IDMastery
public AsyncRequest getDataMasteryList(Platform platform, Locale locale, java.lang.String version, MasteryListTags... tags)
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
MasteryList
public AsyncRequest getDataMasteryList(Platform platform)
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.MasteryList
public AsyncRequest getDataProfileIcons(Platform platform, Locale locale, java.lang.String version)
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
ProfileIconData
public AsyncRequest getDataProfileIcons(Platform platform)
platform
- Platform to execute the method call against.ProfileIconData
public AsyncRequest getDataRealm(Platform platform)
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
Realm
public AsyncRequest getDataRune(Platform platform, int id, Locale locale, java.lang.String version, RuneTags... tags)
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
Rune
public AsyncRequest getDataRune(Platform platform, int id)
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 IDRune
public AsyncRequest getDataRuneList(Platform platform, Locale locale, java.lang.String version, RuneListTags... tags)
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
RuneList
public AsyncRequest getDataRuneList(Platform platform)
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.RuneList
public AsyncRequest getDataSummonerSpell(Platform platform, int id, Locale locale, java.lang.String version, SpellTags... tags)
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
SummonerSpell
public AsyncRequest getDataSummonerSpell(Platform platform, int id)
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 IDSummonerSpell
public AsyncRequest getDataSummonerSpellList(Platform platform, Locale locale, java.lang.String version, boolean dataById, SpellListTags... tags)
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
SummonerSpellList
public AsyncRequest getDataSummonerSpellList(Platform platform)
Not all data is returned by default. See the tags parameter for more information.
platform
- Platform to execute the method call against.SummonerSpellList
public AsyncRequest getDataVersions(Platform platform)
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
public AsyncRequest getFeaturedGames(Platform platform)
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
FeaturedGames
public AsyncRequest getLeaguePositionsBySummonerId(Platform platform, long summonerId)
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner IDjava.lang.NullPointerException
- If platform
is null
LeagueList
public AsyncRequest getLeaguesBySummonerId(Platform platform, long summonerId)
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner IDjava.lang.NullPointerException
- If platform
is null
LeagueList
public AsyncRequest getLobbyEventsByTournament(java.lang.String tournamentCode)
tournamentCode
tournamentCode
- Tournament code used to enter the lobby.java.lang.NullPointerException
- If tournamentCode
is null
LobbyEventWrapper
public AsyncRequest getMasterLeagueByQueue(Platform platform, java.lang.String queue)
queue
.platform
- Platform to execute the method call against.queueType
- Game queue type.java.lang.NullPointerException
- If platform
or queue
is null
LeagueList
public AsyncRequest getMasterLeagueByQueue(Platform platform, LeagueQueue queue)
queue
.platform
- Platform to execute the method call against.queue
- Game queue type.java.lang.NullPointerException
- If queue
is null
LeagueList
public AsyncRequest getMasteriesBySummoner(Platform platform, long summonerId)
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with masteries to retrieve.java.lang.NullPointerException
- If platform
is null
MasteryPages
public AsyncRequest getMatch(Platform platform, long matchId, long forAccountId)
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
Match
public AsyncRequest getMatch(Platform platform, long matchId)
matchId
.platform
- Platform to execute the method call against.matchId
- The ID of the match.Match
public AsyncRequest getMatchIdsByTournamentCode(Platform platform, java.lang.String tournamentCode)
tournamentCode
.platform
- Platform to execute the method call against.tournamentCode
- The code of the tournament.java.lang.NullPointerException
- If platform
or tournamentCode
is null
public AsyncRequest getMatchByMatchIdAndTournamentCode(Platform platform, long matchId, java.lang.String tournamentCode)
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
Match
public AsyncRequest 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)
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
MatchList
public AsyncRequest 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)
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.MatchList
public AsyncRequest getMatchListByAccountId(Platform platform, long accountId)
platform
- Platform to execute the method call against.accountId
- The account ID of the summoner.MatchList
public int getPoolSize()
public int getQueueSize()
@Deprecated public AsyncRequest getRecentMatchListByAccountId(Platform platform, long accountId)
platform
- Platform to execute the method call against.accountId
- The account ID of the summoner.java.lang.NullPointerException
- If platform
is null
MatchList
public AsyncRequest getRunesBySummoner(Platform platform, long summonerId)
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with runes to retrieve.java.lang.NullPointerException
- If platform
is null
RunePages
public AsyncRequest getShardData(Platform platform)
platform
- Platform to execute the method call against.java.lang.NullPointerException
- If platform
is null
ShardStatus
public AsyncRequest getSummonerByAccount(Platform platform, long accountId)
accountId
.platform
- Platform to execute the method call against.summonerId
- Account ID associated with summoner to retrieve.java.lang.NullPointerException
- If platform
is null
Summoner
public AsyncRequest getSummoner(Platform platform, long summonerId)
summonerId
.platform
- Platform to execute the method call against.summonerId
- Summoner ID associated with summoner to retrieve.java.lang.NullPointerException
- If platform
is null
Summoner
public AsyncRequest getSummonerByName(Platform platform, java.lang.String summonerName)
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
Summoner
public AsyncRequest getTimelineByMatchId(Platform platform, long matchId)
matchId
.platform
- Platform to execute the method call against.matchId
- The ID of the match.java.lang.NullPointerException
- If platform
is null
MatchTimeline
public AsyncRequest getTournamentCode(java.lang.String tournamentCode)
tournamentCode
.tournamentCode
- The tournament codejava.lang.NullPointerException
- If tournamentCode
is null
TournamentCode
public void removeListeners(RequestListener... listeners)
RequestListener
from getting informed when asynchronous requests finish.listeners
- One or more objects that implement RequestListener
RequestListener
public void updateTournamentCode(java.lang.String tournamentCode, TournamentMap mapType, PickType pickType, SpectatorType spectatorType, long... allowedSummonerIds)
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