PHPackages                             proveyourskillz/lol-api - 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. proveyourskillz/lol-api

ActiveLibrary[API Development](/categories/api)

proveyourskillz/lol-api
=======================

Yet Another LoL API SDK Wrapper

0.1.3(8y ago)299MITPHPPHP &gt;=7.1

Since Sep 10Pushed 8y ago4 watchersCompare

[ Source](https://github.com/Proveyourskillz/lol-api)[ Packagist](https://packagist.org/packages/proveyourskillz/lol-api)[ RSS](/packages/proveyourskillz-lol-api/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

League of Legends PHP API wrapper
=================================

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

Dead simple wrapper of Riot Games API (LoL)

Requirements
------------

[](#requirements)

- PHP 7.1
- works better with ext-curl installed

Installation
------------

[](#installation)

`composer require proveyourskillz/lol-api`

### Creating API instance

[](#creating-api-instance)

```
$api = new PYS\LolApi\Api(API_KEY);
```

### Laravel/Lumen service provider and Facade

[](#laravellumen-service-provider-and-facade)

#### Laravel/Lumen 5.5

[](#laravellumen-55)

ServiceProvider and Facade are registered automatically through [package discovery](https://laravel.com/docs/5.5/packages#package-discovery)

#### Laravel 5.4

[](#laravel-54)

In `config/app.php` add `PYS\LolApi\Laravel\ServiceProvider` as provider

#### Lumen 5.4

[](#lumen-54)

Register ServiceProvider according [documentation](https://lumen.laravel.com/docs/5.5/providers#registering-providers)

Optionally you can add facade to aliases `'LolApi' => PYS\LolApi\Laravel\Facade::class`

After installation, you can use API through facade or inject as dependency

Usage
-----

[](#usage)

You can find examples of usage in `examples` dir

### Region

[](#region)

You can pass region to request as [2-3 characters code](https://developer.riotgames.com/regional-endpoints.html) but better use `Region` class constants

```
use PYS\LolApi\ApiRequest\Region;

$summoner = $api->summoner(Region::EUW, $summonerId);
```

### Summoner

[](#summoner)

There are several ways to get Summoner: by account id, summoner id or by name

```
// You can get summoner in several ways by passing type in third argument
// Default version: summoner, you can ommit it
$summonerById = $api->summoner($region, $summonerId);
$summonerByAccount = $api->summoner($region, $accountId, 'account');
$summonerByName = $api->summoner($region, $name, 'name');
```

For more information see [Summoner API reference](https://developer.riotgames.com/api-methods/#summoner-v3)

### Match List

[](#match-list)

Recent

```
$matches = $api->matchList($region, $accountId);
```

Recent via Summoner

```
$matches = $api->summoner($region, $summonerId)->recentMatches();
```

Using query (e.g. one last match)

```
$matches = $api->matchList(
    $region,
    $accountId,
    [
        'beginIndex' => 0,
        'endIndex' => 1,
    ]
);
```

### Match

[](#match)

Match by Id

```
$match = $api->match($region, $matchId);
```

Match within Tournament

```
$match = $api->match($region, $matchId, $tournamentId);
```

For more information see [Match API reference](https://developer.riotgames.com/api-methods/#match-v3)

### Leagues

[](#leagues)

Leagues and Positions of summoner by Summoner Id

```
$leaguesPositions = $api->leaguePosition($region, $summonerId);
```

Leagues and Positions of summoner via Summoner object

```
$leaguesPositions = $api
    ->summoner($region, $summonerId)
    ->leaguesPositions();
```

Leagues by Summoner Id

```
$leagues = $api->league($region, $summonerId);
```

Reusable requests and queries
-----------------------------

[](#reusable-requests-and-queries)

Examples from above (e.g., match list request with query) are shows usage of syntax sugar methods and can be rewritten as

```
use PYS\LolApi\ApiRequest\MatchListRequest;
use PYS\LolApi\ApiRequest\Query\MatchListQuery;

$api = new PYS\LolApi\Api($API_KEY);

$query = new MatchListQuery;
$request = new MatchListRequest($region, $accountId);
$request->setQuery($query->lastMatches(1));

$matchList = $api->make($request);
```

Query objects have fluent setters for easy setup some properties like dates etc.

```
// Setup query object to get last 5 matches in 24 hours
$query = new MatchListQuery;
$query
    ->fromDate(new DateTime('-24 hours'))
    ->lastMatches(5);
```

Contributing
------------

[](#contributing)

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

History
-------

[](#history)

Alpha version

Credits
-------

[](#credits)

- Anton Orlov
- Pavel Dudko

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~1 days

Total

4

Last Release

3212d ago

### Community

Maintainers

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

---

Top Contributors

[![likewinter](https://avatars.githubusercontent.com/u/273071?v=4)](https://github.com/likewinter "likewinter (24 commits)")[![pashadude](https://avatars.githubusercontent.com/u/4853201?v=4)](https://github.com/pashadude "pashadude (3 commits)")

---

Tags

apiapi-clientlolriot-apiriot-games-apiriotgamessummonerwrapperapiwrapperLoLlol apiriot-games

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/proveyourskillz-lol-api/health.svg)

```
[![Health](https://phpackages.com/badges/proveyourskillz-lol-api/health.svg)](https://phpackages.com/packages/proveyourskillz-lol-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[seatsio/seatsio-php

A PHP client for the seats.io API

17768.4k](/packages/seatsio-seatsio-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[michaelgarrez/lol-api

Wrapper for League of Legends API

162.6k](/packages/michaelgarrez-lol-api)

PHPackages © 2026

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