PHPackages                             spiregg/riot-api-league - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. spiregg/riot-api-league

ActiveLibrary[API Development](/categories/api)

spiregg/riot-api-league
=======================

Riot League of Legends API wrapper for PHP8

3.1.3(3mo ago)09002GPL-3.0-or-laterPHPPHP &gt;=8.2CI failing

Since Jan 24Pushed 3mo agoCompare

[ Source](https://github.com/SpireGG/riot-api-league)[ Packagist](https://packagist.org/packages/spiregg/riot-api-league)[ Docs](https://github.com/spiregg/riot-api-league)[ Fund](https://www.paypal.me/dolejskad)[ GitHub Sponsors](https://github.com/dolejska-daniel)[ RSS](/packages/spiregg-riot-api-league/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (25)Used By (2)

RiotAPI PHP wrapper for League of Legends
=========================================

[](#riotapi-php-wrapper-for-league-of-legends)

> Version v2.0.0

[![PHP Composer](https://github.com/dolejska-daniel/riot-api-league/actions/workflows/php.yaml/badge.svg)](https://github.com/dolejska-daniel/riot-api-league/actions/workflows/php.yaml)[![codecov](https://camo.githubusercontent.com/29171c1fa708e32b9e4977c473227bc145fecfb688d88be40c316ef2f36d379e/68747470733a2f2f636f6465636f762e696f2f67682f646f6c656a736b612d64616e69656c2f72696f742d6170692d6c65616775652f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d4953444142454b4b454e)](https://codecov.io/gh/dolejska-daniel/riot-api-league)[![Packagist](https://camo.githubusercontent.com/f977bbd5a93551895908767525b231ade870cb2338b3750cbd8e5b5e24fe8de9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f646f6c656a736b612d64616e69656c2f72696f742d6170692d6c6561677565)](https://packagist.org/packages/dolejska-daniel/riot-api-league)[![Packagist](https://camo.githubusercontent.com/c04dd89b5c88b02f7a379ceac0e391339563454646ad6071ac7c8885a254f68a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f6c656a736b612d64616e69656c2f72696f742d6170692d6c6561677565)](https://packagist.org/packages/dolejska-daniel/riot-api-league)[![Packagist PHP Version Support](https://camo.githubusercontent.com/6437df40cd663c1b77d0695134196f6bcaeeacb4818a8b83060b6427e002240a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d6c6561677565)](https://camo.githubusercontent.com/6437df40cd663c1b77d0695134196f6bcaeeacb4818a8b83060b6427e002240a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d6c6561677565)[![Support Project](https://camo.githubusercontent.com/b02c365c454c108cca464a159068651024c682b392cef984e92b93eb49310a7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737570706f72745f70726f6a6563742d50617950616c2d626c7565)](https://www.paypal.me/dolejskad)

Table of Contents
=================

[](#table-of-contents)

1. [Introduction](#introduction)
2. [Downloading](#downloading)
3. [League of Legends API](#league-of-legends-api)
    1. [Resource versions](#resource-versions)
    2. [Initializing the library](#initializing-the-library)
    3. [Usage example](#usage-example)
    4. [Cache providers](#cache-providers)
    5. [Rate limiting](#rate-limiting)
    6. [Call caching](#call-caching)
    7. [Asynchronous requests](#asynchronous-requests)
    8. [StaticData endpoints](#staticdata-endpoints)
    9. [StaticData linking](#staticdata-linking)
    10. [Extensions](#extensions)
    11. [Callback functions](#callback-functions)
    12. [CLI support](#cli-support)
4. [Other Riot APIs](#other-riot-apis)

[Introduction](https://github.com/dolejska-daniel/riot-api-league/wiki/Home#introduction)
=========================================================================================

[](#introduction)

Welcome to the League of Legends PHP library repo! The goal of this library is to create easy-to-use library for anyone who might need one. This is a fully object oriented API wrapper for League of Legends API.

Here are some handy features:

- **[Rate limit caching](https://github.com/dolejska-daniel/riot-api-league/wiki/Rate-limiting)** and limit exceeding prevention - fully automatic.
- **[Call caching](https://github.com/dolejska-daniel/riot-api-league/wiki/Call-caching)** - enables the library to re-use already fetched data within given timespan - saves time and key's rate limit.
- **[StaticData endpoints](https://github.com/dolejska-daniel/riot-api-league/wiki/StaticData-endpoints)** - you can work with StaticData endpoints as if they were never deprecated.
- **[StaticData linking](https://github.com/dolejska-daniel/riot-api-league/wiki/StaticData-linking)** - library can automatically link related StaticData right into the returned object.
- **[Custom callbacks](https://github.com/dolejska-daniel/riot-api-league/wiki/Callback-functions)** - you can set custom function which will be called before or after the request is processed.
- **[Object extensions](https://github.com/dolejska-daniel/riot-api-league/wiki/Extensions)** - you can implement your own methods to the fetched API objects and enable yourself to use them later to ease of your work.
- **[CLI supported](https://github.com/dolejska-daniel/riot-api-league/wiki/CLI-support)** - usage of this library in console is extremely easy.
- **Interim mode** support - you are going to be able to use the library the same way whether your key is in `interim mode` or not (meaning you won't need to change anything when you jump to production).
- **Objects everywhere** - API calls return data in special objects, this allows modern IDEs to hint existing properties and methods.

[![API method hint and documentation](examples/readme/ide_hint_method.png)](examples/readme/ide_hint_method.png)[![API object hint (LeagueEntry)](examples/readme/ide_hint_object_1.png)](examples/readme/ide_hint_object_1.png)[![API object hint (LeagueEntry.miniSeries)](examples/readme/ide_hint_object_2.png)](examples/readme/ide_hint_object_2.png)

Please, refer mainly to the [wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki). This file contains only general introduction to library features.

[Downloading](https://github.com/dolejska-daniel/riot-api-league/wiki/Home#downloading)
=======================================================================================

[](#downloading)

The easiest way to download and use this library is via [Composer](https://getcomposer.org/). If you are not using Composer yet, you should start **right now**!

While having Composer installed on your machine it takes only `composer require "dolejska-daniel/riot-api-league:^1"` command to get the library ready to roll!

For additional information about downloading and initial setup, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Home#downloading).

[League of Legends API](https://github.com/dolejska-daniel/riot-api-league/wiki/How-to-begin)
=============================================================================================

[](#league-of-legends-api)

[Resource versions](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints)
----------------------------------------------------------------------------------------------------

[](#resource-versions)

Below you can find table of implemented API resources and the version in which these are currently implemented. Please refer to [wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints) for additional information about endpoints and resources.

ResourceStatus[Champion](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#champion-)[![Champion resource implemented version](https://camo.githubusercontent.com/4afbceb45c101ef90bd1da527864892b9f7d3308bd9eb939ce052947b14cfff9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76332d627269676874677265656e2e737667)](https://camo.githubusercontent.com/4afbceb45c101ef90bd1da527864892b9f7d3308bd9eb939ce052947b14cfff9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76332d627269676874677265656e2e737667)[Champion Mastery](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#champion-mastery-)[![Champion Mastery resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)Challenges[![Challenges resource implemented version](https://camo.githubusercontent.com/46d87f304c53108aa7eb01b34b645c69134178dbef5ca6c693872a6316ea16d8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76312d627269676874677265656e2e737667)](https://camo.githubusercontent.com/46d87f304c53108aa7eb01b34b645c69134178dbef5ca6c693872a6316ea16d8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76312d627269676874677265656e2e737667)Clash[![Clash resource implemented version](https://camo.githubusercontent.com/46d87f304c53108aa7eb01b34b645c69134178dbef5ca6c693872a6316ea16d8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76312d627269676874677265656e2e737667)](https://camo.githubusercontent.com/46d87f304c53108aa7eb01b34b645c69134178dbef5ca6c693872a6316ea16d8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76312d627269676874677265656e2e737667)[League](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#league-)[![League resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)[League Exp](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#league-exp-)[![League Exp resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)Masteries[![Masteries resource implemented version](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)[Match](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#match-)[![Match resource implemented version](https://camo.githubusercontent.com/0b1b446ed476fed554c62eb716119656051cffaa84876eb63ff4daa1e22d81dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76352d627269676874677265656e2e737667)](https://camo.githubusercontent.com/0b1b446ed476fed554c62eb716119656051cffaa84876eb63ff4daa1e22d81dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76352d627269676874677265656e2e737667)Runes[![Runes resource implemented version](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)[Spectator](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#spectator-)[![Spectator resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)[Static Data](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#static-data-)[![Static Data resource implemented version](https://camo.githubusercontent.com/409b64737805c067a913b0ad6c33f3f9dd278eed1f7987716f7d5aaf209964e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d5f776f726b696e672d627269676874677265656e2e737667)](https://camo.githubusercontent.com/409b64737805c067a913b0ad6c33f3f9dd278eed1f7987716f7d5aaf209964e3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d5f776f726b696e672d627269676874677265656e2e737667)Stats[![Stats endpoint implemented version](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)[Status](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#status-)[![Status resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)[Summoner](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#summoner-)[![Summoner resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)Third Party Code[![Third Party Code endpoint implemented version](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)](https://camo.githubusercontent.com/fbf9831855f5081295ff3fe6ccaad516396b0e8249ecea29a7d3e57170a50ebc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d646570726563617465642d677261792e737667)[Tournament](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#tournament---tournament-stub-)[![Tournament resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)[Tournament Stub](https://github.com/dolejska-daniel/riot-api-league/wiki/Resources-and-endpoints#tournament---tournament-stub-)[![Tournament Stub resource implemented version](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)](https://camo.githubusercontent.com/35420bf237577032392b60771539196f0a33bad66152841caeb64bfc3b2a03c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696d706c656d656e7465645f76657273696f6e2d76342d627269676874677265656e2e737667)[Initializing the library](https://github.com/dolejska-daniel/riot-api-league/wiki/How-to-begin)
------------------------------------------------------------------------------------------------

[](#initializing-the-library)

How to begin?

```
//  Include all required files (installation via Composer is required)
require_once __DIR__  . "/vendor/autoload.php";

use RiotAPI\LeagueAPI\LeagueAPI;
use RiotAPI\Base\Definitions\Region;

//  Initialize the library
$api = new LeagueAPI([
	//  Your API key, you can get one at https://developer.riotgames.com/
	LeagueAPI::SET_KEY    => 'YOUR_RIOT_API_KEY',
	//  Target region (you can change it during lifetime of the library instance)
	LeagueAPI::SET_REGION => Region::EUROPE_EAST,
]);

//  And now you are ready to rock!
$summoner = $api->getSummonerByName("I am TheKronnY");
$matchlist = $api->getMatchlistByAccount($summoner->accountId);
foreach ($matchlist as $match) {
	//  ...
}
```

And there is a lot more settings that you can set when initializing the library - mainly to enable special features or to amend default behaviour of the library. Please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/How-to-begin) for complete list of library's settings.

[Usage example](https://github.com/dolejska-daniel/riot-api-league/wiki/How-to-begin#usage-example)
---------------------------------------------------------------------------------------------------

[](#usage-example)

Working with LeagueAPI can not be easier, just take a look at how to fetch summoner information based on summoner's name:

```
//  ...initialization...

//  this fetches the summoner data and returns SummonerDto object
$summoner = $api->getSummonerByName('I am TheKronnY');

echo $summoner->id;             //  KnNZNuEVZ5rZry3I...
echo $summoner->puuid;          //  rNmb6Rq8CQUqOHzM...
echo $summoner->name;           //  I am TheKronnY
echo $summoner->summonerLevel;  //  69

print_r($summoner->getData());  //  Or array of all the data
/* Array
 * (
 *     [id] => KnNZNuEVZ5rZry3IyWwYSVuikRe0y3qTWSkr1wxcmV5CLJ8
 *     [accountId] => tGSPHbasiCOgRM_MuovMKfXw7oh6pfXmGiPDnXcxJDohrQ
 *     [puuid] => rNmb6Rq8CQUqOHzMsFihMCUy4Pd201vDaRW9djAoJ9se7myXrDprvng9neCanq7yGNmz7B3Wri4Elw
 *     [name] => I am TheKronnY
 *     [profileIconId] => 3180
 *     [revisionDate] => 1543438015000
 *     [summonerLevel] => 69
 * )
 */
```

More usage examples for LeagueAPI can be found [here](https://github.com/dolejska-daniel/riot-api-league/blob/master/examples/LeagueAPI/README.md).

[Cache providers](https://github.com/dolejska-daniel/riot-api-league/wiki/Cache-providers)
------------------------------------------------------------------------------------------

[](#cache-providers)

Cache providers are responsible for keeping data of [rate limiting](#rate-limiting), [call caching](#call-caching) and [static data](##datadragon-api) within instances of the library for easy re-use. This feature is automatically enabled, when any of previously mentioned features is used.

When using this feature, you can set `LeagueAPI::SET_CACHE_PROVIDER` to any class, thought it has to be compatible with PSR-6 standard, eg. implement [`Psr\Cache\CacheItemPoolInterface`](https://github.com/php-fig/cache/blob/master/src/CacheItemPoolInterface.php) interface. By using `LeagueAPI::SET_CACHE_PROVIDER_PARAMS` or `LeagueAPI::SET_DD_CACHE_PROVIDER_PARAMS` option, you can pass any data to the cache provider class.

For additional information about cache providers, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Cache-providers).

[Rate limiting](https://github.com/dolejska-daniel/riot-api-league/wiki/Rate-limiting)
--------------------------------------------------------------------------------------

[](#rate-limiting)

This clever feature will easily prevent exceeding your per key call limits &amp; method limits. In order to enable this feature, you have to set `LeagueAPI::SET_CACHE_RATELIMIT` to `true`. Everything else is completly automatic, so all you need to do is to enable this feature.

For additional information about rate limiting, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Rate-limiting).

[Call caching](https://github.com/dolejska-daniel/riot-api-league/wiki/Call-caching)
------------------------------------------------------------------------------------

[](#call-caching)

This feature can prevent unnecessary calls to API within short timespan by temporarily saving fetched data from API and using them as the result data. In order to enable this feature, you have to set `LeagueAPI::SET_CACHE_CALLS` to `true`. You should also provide `LeagueAPI::SET_CACHE_CALLS_LENGTH` option to specify cached data lifetime or else default time interval of `60 seconds` will be used.

For additional information about API call caching, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Call-caching).

[Asynchronous requests](https://github.com/dolejska-daniel/riot-api-league/wiki/Asynchronous-requests)
------------------------------------------------------------------------------------------------------

[](#asynchronous-requests)

This feature allows request grouping and their asynchronous sending using [Guzzle](https://github.com/guzzle/guzzle). After request is sent and its response received, user provided callbacks are invoked with received data.

For additional information about asynchronous requests, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Asynchronous-requests).

[StaticData endpoints](https://github.com/dolejska-daniel/riot-api-league/wiki/StaticData-endpoints)
----------------------------------------------------------------------------------------------------

[](#staticdata-endpoints)

These endpoints provide you with easy way to transform StaticData into object instances and easily work with them. They are also supported in numerous DataDragonAPI functions (displaying images).

For additional information about StaticData endpoints, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/StaticData-endpoints).

[StaticData linking](https://github.com/dolejska-daniel/riot-api-league/wiki/StaticData-linking)
------------------------------------------------------------------------------------------------

[](#staticdata-linking)

This feature allows you to automatically link static data related to your request, any data are managed through `DataDragonAPI`. All the static data will be locally cached, which makes this operation very fast after its initial requests. Also, any requests made by `DataDragonAPI` do not count towards your rate limit.

For additional information about StaticData linking, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/StaticData-linking).

[Extensions](https://github.com/dolejska-daniel/riot-api-league/wiki/Extensions)
--------------------------------------------------------------------------------

[](#extensions)

Using extensions for `ApiObject`s is extremely useful tool, allowing implementation of your own methods and logic into the `ApiObject`s themselves. Extensions are enabled by using settings option `LeagueAPI::SET_EXTENSIONS` when initializing the library.

For additional information about API object extensions, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Extensions).

[Callback functions](https://github.com/dolejska-daniel/riot-api-league/wiki/Callback-functions)
------------------------------------------------------------------------------------------------

[](#callback-functions)

Allows you to provide custom functions to be called before and after the actual API request is sent.

Before callbacks have ability to cancel upcomming request - when `false` is returned by *any callback* function, exception `Exceptions\RequestException` is raised and request is cancelled.

For additional information about callback functions, please see [the wiki pages](https://github.com/dolejska-daniel/riot-api-league/wiki/Callback-functions).

Other Riot APIs
===============

[](#other-riot-apis)

Library DescriptionLatest VersionStable Version[All APIs](https://github.com/dolejska-daniel/riot-api) (metapackage)[![GitHub Latest Release](https://camo.githubusercontent.com/fc16ce8581402b4eb4b93d1f4b3981a0433d9b6b506aef25a51e56a483984fd2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170693f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/fc16ce8581402b4eb4b93d1f4b3981a0433d9b6b506aef25a51e56a483984fd2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170693f696e636c7564655f70726572656c6561736573)[![GitHub Release](https://camo.githubusercontent.com/8ba5b2a63587dc833749d22b715e73b662f44a2662446ea350af0958e8f34e41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d617069)](https://camo.githubusercontent.com/8ba5b2a63587dc833749d22b715e73b662f44a2662446ea350af0958e8f34e41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d617069) [![PHP Version](https://camo.githubusercontent.com/e30cbd31f2797d041b7f02112c3e86b23cd3eec1447558692dfb19c692b5f0de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d617069)](https://camo.githubusercontent.com/e30cbd31f2797d041b7f02112c3e86b23cd3eec1447558692dfb19c692b5f0de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d617069)[DataDragon API](https://github.com/dolejska-daniel/riot-api-datadragon)[![GitHub Latest Release](https://camo.githubusercontent.com/f2dec5203e6eb50e279e43801e2c9bf7cc93c64b9d35bf4615434463cdae29ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d64617461647261676f6e3f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/f2dec5203e6eb50e279e43801e2c9bf7cc93c64b9d35bf4615434463cdae29ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d64617461647261676f6e3f696e636c7564655f70726572656c6561736573)[![GitHub Release](https://camo.githubusercontent.com/ed28a7655e66f21e9c1cafed9ed6a70afa88a1c28af55731df3a00cdafab0190/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d64617461647261676f6e)](https://camo.githubusercontent.com/ed28a7655e66f21e9c1cafed9ed6a70afa88a1c28af55731df3a00cdafab0190/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d64617461647261676f6e) [![PHP Version](https://camo.githubusercontent.com/d1deee43a59332c74648917c46484cb29735aed922de8ee446b6c529b9a650ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d64617461647261676f6e)](https://camo.githubusercontent.com/d1deee43a59332c74648917c46484cb29735aed922de8ee446b6c529b9a650ad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d64617461647261676f6e)[Teamfight Tactics API](https://github.com/dolejska-daniel/riot-api-tft)[![GitHub Latest Release](https://camo.githubusercontent.com/63dc5e5abb7d97d71a453297fc4ee5170bcea4956bc996ee49f083cc030c903e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d7466743f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/63dc5e5abb7d97d71a453297fc4ee5170bcea4956bc996ee49f083cc030c903e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d7466743f696e636c7564655f70726572656c6561736573)[![GitHub Release](https://camo.githubusercontent.com/00464043a817c4304c2c7d1a0b93d41e7870bd8cfb54739b2950ada12a4f3395/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d746674)](https://camo.githubusercontent.com/00464043a817c4304c2c7d1a0b93d41e7870bd8cfb54739b2950ada12a4f3395/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d746674) [![PHP Version](https://camo.githubusercontent.com/c2173df2e272f5c132e88adeb6b3658a66437d48aeee4c6e02e12ed094c70ec7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d746674)](https://camo.githubusercontent.com/c2173df2e272f5c132e88adeb6b3658a66437d48aeee4c6e02e12ed094c70ec7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d746674)[Legends of Runeterra API](https://github.com/dolejska-daniel/riot-api-runeterra)[![GitHub Latest Release](https://camo.githubusercontent.com/c20a15e82643e729a97880a0245f16628176794c7ac14dad511d7bca15384bb5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d72756e6574657272613f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/c20a15e82643e729a97880a0245f16628176794c7ac14dad511d7bca15384bb5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d72756e6574657272613f696e636c7564655f70726572656c6561736573)[![GitHub Release](https://camo.githubusercontent.com/990a55bd6f3a5bc743918bd3d35afd94a84be51979434d90da6d936de7bb2e0d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d72756e657465727261)](https://camo.githubusercontent.com/990a55bd6f3a5bc743918bd3d35afd94a84be51979434d90da6d936de7bb2e0d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d72756e657465727261) [![PHP Version](https://camo.githubusercontent.com/940c6bcaa72c925cf6f683fe52c5a66d8ac0ba9883f0d1b4e52f8b3f3b799753/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d72756e657465727261)](https://camo.githubusercontent.com/940c6bcaa72c925cf6f683fe52c5a66d8ac0ba9883f0d1b4e52f8b3f3b799753/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d72756e657465727261)[Valorant API](https://github.com/dolejska-daniel/riot-api-valorant)[![GitHub Latest Release](https://camo.githubusercontent.com/4a23913f4c1140b7eb5dcf1acb9ae8fbecd4a89588ed0a70270bf135fa3a1f3f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d76616c6f72616e743f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/4a23913f4c1140b7eb5dcf1acb9ae8fbecd4a89588ed0a70270bf135fa3a1f3f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d76616c6f72616e743f696e636c7564655f70726572656c6561736573)[![GitHub Release](https://camo.githubusercontent.com/bdaefc838c45bb8148788d3c70af1f0db042b6ad917458e205df9218f5f2a700/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d76616c6f72616e74)](https://camo.githubusercontent.com/bdaefc838c45bb8148788d3c70af1f0db042b6ad917458e205df9218f5f2a700/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646f6c656a736b612d64616e69656c2f72696f742d6170692d76616c6f72616e74) [![PHP Version](https://camo.githubusercontent.com/3a4a40e95333bf2194999127fd32c2c583c07bd252e0c935be5ebb289f465b6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d76616c6f72616e74)](https://camo.githubusercontent.com/3a4a40e95333bf2194999127fd32c2c583c07bd252e0c935be5ebb289f465b6a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6c656a736b612d64616e69656c2f72696f742d6170692d76616c6f72616e74)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance78

Regular maintenance activity

Popularity14

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 88.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~51 days

Total

22

Last Release

118d ago

Major Versions

v1.0.1 → v2.0.02023-06-11

2.4.0 → 3.0.02025-06-25

PHP version history (4 changes)v1.0.0PHP &gt;=7.3

v1.0.1PHP &gt;=8.0

v2.0.0PHP &gt;=8.1

2.4.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7394bdefd2b1c453a4877ee470f721097c39fb01f907ee3b9b3e9457a734841?d=identicon)[chypriote](/maintainers/chypriote)

---

Top Contributors

[![dolejska-daniel](https://avatars.githubusercontent.com/u/10078080?v=4)](https://github.com/dolejska-daniel "dolejska-daniel (298 commits)")[![chypriote](https://avatars.githubusercontent.com/u/4965058?v=4)](https://github.com/chypriote "chypriote (26 commits)")[![hackoh](https://avatars.githubusercontent.com/u/497444?v=4)](https://github.com/hackoh "hackoh (2 commits)")[![TheMY3](https://avatars.githubusercontent.com/u/9335727?v=4)](https://github.com/TheMY3 "TheMY3 (2 commits)")[![initred](https://avatars.githubusercontent.com/u/34208843?v=4)](https://github.com/initred "initred (1 commits)")[![mrfelipemartins](https://avatars.githubusercontent.com/u/24225909?v=4)](https://github.com/mrfelipemartins "mrfelipemartins (1 commits)")[![santutu](https://avatars.githubusercontent.com/u/28470293?v=4)](https://github.com/santutu "santutu (1 commits)")[![strebl](https://avatars.githubusercontent.com/u/6151204?v=4)](https://github.com/strebl "strebl (1 commits)")[![TheKeymaster](https://avatars.githubusercontent.com/u/20555112?v=4)](https://github.com/TheKeymaster "TheKeymaster (1 commits)")[![ThisRimKa](https://avatars.githubusercontent.com/u/88565779?v=4)](https://github.com/ThisRimKa "ThisRimKa (1 commits)")[![dgunay](https://avatars.githubusercontent.com/u/16074091?v=4)](https://github.com/dgunay "dgunay (1 commits)")[![elreco](https://avatars.githubusercontent.com/u/42843594?v=4)](https://github.com/elreco "elreco (1 commits)")[![FlorianMifsud](https://avatars.githubusercontent.com/u/54841233?v=4)](https://github.com/FlorianMifsud "FlorianMifsud (1 commits)")

---

Tags

apiwrapperleague of legendsphp8Riot

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/spiregg-riot-api-league/health.svg)

```
[![Health](https://phpackages.com/badges/spiregg-riot-api-league/health.svg)](https://phpackages.com/packages/spiregg-riot-api-league)
```

###  Alternatives

[gabrielbull/ups-api

PHP UPS API

4642.4M10](/packages/gabrielbull-ups-api)[wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

4282.9k](/packages/wtfzdotnet-php-tmdb-api)[uderline/openapi-php-attributes

Automatically render your OpenApi 3 file describing your PHP API using attributes

2136.3k](/packages/uderline-openapi-php-attributes)[walle89/swedbank-json

Unofficial API client for the Swedbank's and Sparbanken's mobile apps in Sweden.

752.5k](/packages/walle89-swedbank-json)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
