Skip to content

LeagueAPI: Resources and endpoints

Daniel Dolejška edited this page Dec 16, 2018 · 13 revisions

Version v3.0.0-rc.1

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

All these functions are endpoints of resource LeagueAPI::RESOURCE_CHAMPION. See usage examples for Champion resource for more details.

Champion Mastery

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

League

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

Match

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

Spectator

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

Static Data

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

Status

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

Summoner

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

Third Party Code

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

Tournament

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

All these functions are endpoints of resource LeagueAPI::RESOURCE_TOURNAMENT. When using interim mode resource LeagueAPI::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' => [ "...", ... ],
	'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(',', [ "...", ... ]),
	'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,
]);

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