Skip to content

LeagueAPI: Resources and endpoints

Daniel Dolejška edited this page Jul 28, 2017 · 13 revisions

Below you can find table of implemented API endpoints and the version in which they are currently implemented.

Endpoint Status
Champion Champion endpoint implemented version
Champion Mastery Champion Mastery endpoint implemented version
League League endpoint implemented version
Masteries Masteries endpoint implemented version
Match Match endpoint implemented version
Runes Runes endpoint implemented version
Spectator Spectator endpoint implemented version
Static Data Static Data endpoint implemented version
Stats Stats endpoint implemented version
Status Status endpoint implemented version
Summoner Summoner endpoint implemented version
Tournament Tournament endpoint implemented version
Tournament Stub Tournament Stub endpoint implemented version

Resources and endpoints

Below you will find tables containting endpoint functions for each resource. resources are only important when you want to use resource specific Call caching. Otherwise they doesn't play any significant role.

Parameters with specified default value are optional.

Champion Champion endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_CHAMPION.

Function name Parameters Return type
getChampions bool $only_free_to_play = null Objects\ChampionListDto
getChampionById int $champion_id Objects\ChampionDto

Champion Mastery Champion Mastery endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_CHAMPIONMASTERY.

Function name Parameters Return type
getChampionMastery int $summoner_id, int $champion_id Objects\ChampionMasteryDto
getChampionMasteries int $summoner_id Objects\ChampionMasteryDto[]
getChampionMasteryScore int $summoner_id int

League League endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_LEAGUE.

Function name Parameters Return type
getLeaguesForSummoner int $summoner_id Objects\LeagueListDto[]
getLeaguePositionsForSummoner int $summoner_id Objects\LeaguePositionDto[]
getLeagueChallenger string $game_queue_type Objects\LeagueListDto
getLeagueMaster string $game_queue_type Objects\LeagueListDto

Masteries Masteries endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_MASTERIES.

Function name Parameters Return type
getMasteriesBySummoner int $summoner_id Objects\MasteryPagesDto

Match Match endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_MATCH.

Function name Parameters Return type
getMatch int $match_id, int $for_account_id = null Objects\MatchDto
getMatchByTournamentCode int $match_id, string $tournament_code Objects\MatchDto
getMatchIdsByTournamentCode string $tournament_code int[]
getMatchlistByAccount int $account_id Objects\MatchlistDto
getRecentMatchlistByAccount int $account_id Objects\MatchlistDto
getMatchTimeline int $match_id Objects\MatchTimelineDto

Runes Runes endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_RUNES.

Function name Parameters Return type
getRunesBySummoner int $summoner_id Objects\RunePagesDto

Spectator Spectator endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_SPECTATOR.

Function name Parameters Return type
getCurrentGameInfo - Objects\CurrentGameInfo
getFeaturedGames - Objects\FeaturedGames

Static Data Static Data endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_STATICDATA.

Function name Parameters Return type
getStaticChampions string $locale = null, string $version = null, bool $data_by_id = null, string|string[] $tags = null StaticData\StaticChampionListDto
getStaticChampion int $champion_id, string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticChampionDto
getStaticItems string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticItemListDto
getStaticItem bool $item_id, string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticItemDto
getStaticLanguageStrings string $locale = null, string $version = null StaticData\StaticLanguageStringsDto
getStaticLanguages - string[]
getStaticMaps string $locale = null, string $version = null StaticData\StaticMapDataDto
getStaticMasteries string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticMasteryListDto
getStaticMastery bool $mastery_id = null, string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticMasteryDto
getStaticProfileIcons string $locale = null, string $version = null StaticData\StaticProfileIconDataDto
getStaticRealm - StaticData\StaticRealmDto
getStaticRunes string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticRuneListDto
getStaticRune int $rune_id, string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticRuneDto
getStaticSummonerSpells string $locale = null, string $version = null, bool $data_by_id = null, string|string[] $tags = null StaticData\StaticSummonerSpellListDto
getStaticSummonerSpell int $summoner_spell_id, string $locale = null, string $version = null, string|string[] $tags = null StaticData\StaticSummonerSpellDto
getStaticVersions - string[]

Status Status endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_STATUS.

Function name Parameters Return type
getStatusData string $override_region = null Objects\ShardStatus

Summoner Summoner endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_SUMMONER.

Function name Parameters Return type
getSummoner int $summoner_id Objects\SummonerDto
getSummonerByName string $summoner_name Objects\SummonerDto
getSummonerByAccount int $account_id Objects\SummonerDto

Tournament Tournament endpoint implemented version & Tournament Stub Tournament Stub endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_TOURNAMENT. When using interim mode resource RiotAPI::RESOURCE_TOURNAMENT_STUB will be used instead.

Only these functions are available in interim mode:

  • createTournamentCodes
  • createTournamentProvider
  • createTournament
  • getTournamentLobbyEvents

Other functions will throw Exceptions\RequestException when used in interim mode.

Function name Parameters Return type
createTournamentCodes int $tournament_id, int $count, Objects\TournamentCodeParameters string[]
editTournamentCode string $tournament_code, Objects\TournamentCodeUpdateParameters -
getTournamentCodeData string $tournament_code Objects\TournamentCodeDto
createTournamentProvider Objects\ProviderRegistrationParameters int
createTournament Objects\TournamentRegistrationParameters int
getTournamentLobbyEvents string $tournament_code Objects\LobbyEventDtoWrapper

Using special objects in requests:

Objects\TournamentCodeParameters and Objects\SummonerIdParams:

//  ...
$codeParams = new Objects\TournamentCodeParameters([
	'allowedSummonerIds' => new Objects\SummonerIdParams([
		'participants' => [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
	]),
	'mapType'       => 'SUMMONERS_RIFT',
	'pickType'      => 'ALL_RANDOM',
	'spectatorType' => 'ALL',
	'teamSize'      => 5,
]);

$codes = $api->createTournamentCodes($tournament_id, $count, $codeParams);

Objects\TournamentCodeUpdateParameters:

//  ...
$codeParams = new Objects\TournamentCodeUpdateParameters([
	'allowedParticipants' => implode(',', [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]),
	'mapType'             => 'SUMMONERS_RIFT',
	'pickType'            => 'ALL_RANDOM',
	'spectatorType'       => 'ALL',
	'teamSize'            => 5,
]);

$api->editTournamentCode($tournament_code, $codeParams);

Objects\ProviderRegistrationParameters:

//  ...
$providerParams = new Objects\ProviderRegistrationParameters([
	'region' => Region::EUROPE_EAST,
	'url'    => $callback_url,
]);

$provider_id = $api->createTournamentProvider($providerParams);

Objects\TournamentRegistrationParameters:

//  ...
$tournamentParams = new Objects\TournamentRegistrationParameters([
	'providerId' => $provider_id,
	'name'       => $tournament_name,
]);

$provider_id = $api->createTournament($tournamentParams);