Skip to content

LeagueAPI: Resources and endpoints

Daniel Dolejška edited this page Nov 30, 2018 · 13 revisions

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

Resource Status
Champion Champion resource implemented version
Champion Mastery Champion Mastery resource implemented version
League League resource implemented version
Masteries Masteries resource implemented version
Match Match resource implemented version
Runes Runes resource implemented version
Spectator Spectator resource implemented version
Static Data Static Data resource implemented version
Stats Stats endpoint implemented version
Status Status resource implemented version
Summoner Summoner resource implemented version
Third Party Code Third Party Code endpoint implemented version
Tournament Tournament resource implemented version
Tournament Stub Tournament Stub resource 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. See usage examples for Champion resource for more details.

Champion Mastery Champion Mastery endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_CHAMPIONMASTERY. See usage examples for ChampionMastery resource for more details.

League League endpoint implemented version

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

Match Match endpoint implemented version

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

Spectator Spectator endpoint implemented version

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

Static Data Static Data endpoint implemented version

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

Status Status endpoint implemented version

All these functions are endpoints of resource RiotAPI::RESOURCE_STATUS. See usage examples for Status resource for more details.

Summoner Summoner endpoint implemented version

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

Third Party Code Third Party Code endpoint implemented version

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

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

All tournament endpoints are instead of RiotAPI::SET_KEY using RiotAPI::SET_TOURNAMENT_KEY. Please make sure, you set them correctly.

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.

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);