PHPackages                             callisto/riot-api-wrapper - 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. callisto/riot-api-wrapper

ActiveLibrary[API Development](/categories/api)

callisto/riot-api-wrapper
=========================

RiotApiWrapper (RAW)

2.0.2(3y ago)4522PHPPHP &gt;=8.0.2

Since Apr 10Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Callisto01/RiotApiWrapper)[ Packagist](https://packagist.org/packages/callisto/riot-api-wrapper)[ RSS](/packages/callisto-riot-api-wrapper/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (2)Versions (8)Used By (0)

RAW (RiotApiWrapper)
====================

[](#raw-riotapiwrapper)

RAW (RiotApiWrapper) is a PHP project designed to provide a wrapper for the Riot Games API, allowing developers to easily access the data and services offered by the API. With this wrapper, users can access the API through simple and intuitive PHP code, without needing to worry about the underlying technical details of the API.

Our goal is to make the Riot Games API accessible to as many people as possible, regardless of their technical background or level of expertise. By simplifying the interface and providing clear documentation, RAW enables a wider range of developers to take advantage of the wealth of data and services available through the Riot Games API.

Using Composer to manage dependencies, RAW is designed to be easy to install and integrate into any PHP project. Whether you're building a new application from scratch or adding new features to an existing project, RAW will make it easy to incorporate the Riot Games API into your code.

So if you're looking for a simple and reliable way to work with the Riot Games API, look no further than RAW. With clear documentation, intuitive code, and support for Composer, RAW is the perfect choice for anyone looking to get the most out of the Riot Games API.

Riot APILoL APITFT APILORT APIValorant APIDatadragon✅ Available✅ Available✅ Available🚧 Work in progress🚧 Work in progress🚧 Work in progressVote for next update priority (3.0.0) :

Vote history :

- Vote result for version 2.0.0 (completed on 2023/04/12) :

Deployment
----------

[](#deployment)

To install this project run

```
composer require callisto/riot-api-wrapper
```

**RAW requires Symfony 6.2 or later and php 8.0 or later**

Usage
-----

[](#usage)

```
$raw = new \Callisto\RiotApiWrapper\RiotApiWrapper('YOUR_API_KEY');
```

To get your api key, create an account on Riot's developer portal. Then, go to the dashboard and click on the button to generate a development key. To get a permanent key, register your application on the Riot Games developer site and wait for approval. Once approved, you can access Riot's API with your permanent API key.

```
$summoner = $raw->LOL('EUW1')->Summoner()->byName('NAME');
```

References
----------

[](#references)

You can see the original Riot api documentation here :

### Platforms and regions list

[](#platforms-and-regions-list)

Platforms list

```
['BR1','EUN1','EUW1','JP1','KR','LA1','LA2','NA1','OC1','TR1','RU','PH2','SG2','TH2','TW2','VN2']
```

Regions list

```
['AMERICAS','ASIA','EUROPE','SEA']
```

### Wrapper References

[](#wrapper-references)

### Riot

[](#riot)

```
// Riot/Account

- Riot()->Account(string $region)->byPuuid(string $puuid)
- Riot()->Account(string $region)->byGame(string $game, string $puuid)
```

### LOL

[](#lol)

```
// LOL/ChampionMastery

- LOL()->ChampionMastery(string $platform)->bySummoner(string $encryptedSummonerId)
- LOL()->ChampionMastery(string $platform)->byChampion(string $encryptedSummonerId, string $championId)
- LOL()->ChampionMastery(string $platform)->top(string $encryptedSummonerId)
- LOL()->ChampionMastery(string $platform)->scores(string $encryptedSummonerId)
```

```
// LOL/ChampionMastery

- LOL()->Champion(string $platform)->rotations()
```

```
// LOL/Clash

- LOL()->Clash(string $platform)->byPuuid(string $puuid)
- LOL()->Clash(string $platform)->bySummoner(string $summonerId)
- LOL()->Clash(string $platform)->team(string $teamId)
- LOL()->Clash(string $platform)->tournaments()
- LOL()->Clash(string $platform)->tournamentsByTeam(string $teamId)
- LOL()->Clash(string $platform)->tournamentsById(string $tournamentId)
```

```
// LOL/LeagueExp

- LOL()->LeagueExp(string $platform)->exp(string $queue, string $tier, string $division)
```

```
// LOL/League

- LOL()->League(string $platform)->byQueue(string $queue)
- LOL()->League(string $platform)->bySummonerId(string $summonerId)
- LOL()->League(string $platform)->byQueueTierDivision(string $queue, string $tier, string $division)
- LOL()->League(string $platform)->grandMasterLeagues(string $queue)
- LOL()->League(string $platform)->leagueId(string $leagueId)
- LOL()->League(string $platform)->masterLeagues(string $queue)
```

```
// LOL/Challenges

- LOL()->Challenges(string $platform)->challenges()
- LOL()->Challenges(string $platform)->percentiles()
- LOL()->Challenges(string $platform)->challengeIdConfig(string $challengeId)
- LOL()->Challenges(string $platform)->leaderboardByLevel(string $challengeId, string $level)
- LOL()->Challenges(string $platform)->percentilesByChallengeId(string $challengeId)
- LOL()->Challenges(string $platform)->playerData(string $puuid)
```

```
// LOL/Status

- LOL()->Status(string $platform)->status()
```

```
// LOL/Matches

- LOL()->Status(string $region)->ids(string $puuid, array $options = [])
- LOL()->Status(string $region)->match(string $matchId)
- LOL()->Status(string $region)->timeline(string $matchId)
```

```
// LOL/Spectator

- LOL()->Spectator(string $platform)->activeGames(string $summonerId)
- LOL()->Spectator(string $platform)->featuredGames()
```

```
// LOL/Summoner

- LOL()->Summoner(string $platform)->byAccount(string $accountId)
- LOL()->Summoner(string $platform)->byName(string $summonerName)
- LOL()->Summoner(string $platform)->byPuuid(string $puuid)
- LOL()->Summoner(string $platform)->bySummonerId(string $summonerId)
```

#### TFT (⭐ NEW)

[](#tft--new)

```
// TFT/League

- TFT()->League(string $platform)->challenger()
- TFT()->League(string $platform)->bySummonerId(string $summonerId)
- TFT()->League(string $platform)->byTierAndDivision(string $tier, string $division, array $options = [])
- TFT()->League(string $platform)->grandmaster()
- TFT()->League(string $platform)->byLeagueId(string $leagueId)
- TFT()->League(string $platform)->master()
- TFT()->League(string $platform)->topByQueue(string $queue)
```

```
// TFT/Matches

- TFT()->Matches(string $region)->ids(string $puuid, array $options = [])
- TFT()->Matches(string $region)->match(string $matchId)
```

```
// TFT/Status

- TFT()->Status(string $platform)->platformData()
```

```
// TFT/Summoner

- TFT()->Summoner(string $platform)->byAccountId(string $accountId)
- TFT()->Summoner(string $platform)->byName(string $name)
- TFT()->Summoner(string $platform)->byPuuid(string $puuid)
- TFT()->Summoner(string $platform)->bySummonerId(string $summonerId)
```

#### LORT

[](#lort)

🚧 Work in Progress

#### Valorant

[](#valorant)

🚧 Work in Progress

Exemples
--------

[](#exemples)

**LOL**

```
// Get recent LoL matches exemple

require __DIR__ . '/../../vendor/autoload.php';

$raw = new \Callisto\RiotApiWrapper\RiotApiWrapper('YOUR_API_KEY'); // Init RiotApiWrapper
$raw->Cache(); // (Optional) Enable cache.

// (Optional) Request options
$options = [
    'startTime' => strtotime('01/01/2023'), // (Optional) timestamp (seconds). Before this date, matches won't be included in result.
    'endTime'   => strtotime('now'), // (Optional) timestamp (seconds). After this date, matches won't be included in result.
    'queue'     => 400, // (Optional) queue id.
    'type'      => 'normal', // (Optional) match type
    'start'     => 0, // (Optional) Start index
    'count'     => 20, // (Optional) max results count
];

try {

    $matchesIds = $raw->LOL()->Matches('EUROPE')->ids('PUUID',$options); // Return matches ids list

    foreach ($matchesIds as $matchId){
        $matches[] = $raw->LOL()->Matches('EUROPE')->match($matchId); // Return match datas from match id
    }

    print_r($matches);

}Catch(Exception $exception){
    exit($exception->getMessage());
}Catch(\Callisto\RiotApiWrapper\Exceptions\RequestExceptions $exception){
    exit($exception->getMessage());
}
```

```
// Search summoner

$name = 'example'; // Summoner name to search

$raw = new \Callisto\RiotApiWrapper\RiotApiWrapper('YOUR_API_KEY'); // Init RiotApiWrapper
$raw->Cache(); // (Optional) Enable cache.

$searchPlatform =  ['BR1','EUN1','EUW1','JP1','KR','LA1','LA2']; // Select platforms you want to search on

try {

    foreach ($searchPlatform as $platform){
        $results[$platform] = $raw->LOL()->Summoner($platform)->byName($name); // Save result even if empty
    }

}catch (\Callisto\RiotApiWrapper\Exceptions\RequestExceptions $exception){
    exit($exception->getMessage());
} catch (Exception $e) {
    exit($e->getMessage());
}

print_r($results);
```

**TFT**

```
// Get summoner and last match

require __DIR__ . '/../../vendor/autoload.php';

$raw = new \Callisto\RiotApiWrapper\RiotApiWrapper('YOUR_API_KEY'); //Init RiotApiWrapper
$raw->Cache(); // (Optional) Enable cache.

try {

    $summoner = $raw->TFT()->Summoner('EUW1')->byName('NAME'); // Get {NAME} summoner data

    $options = [
        'count' => 1, // (Optional) max results count
    ];

    $lastMatchId = $raw->TFT()->Matches('EUROPE')->ids($summoner['puuid'],$options)[0]; // Get last match id

    $lastMatch = $raw->TFT()->Matches('EUROPE')->match($lastMatchId); // Get $lastMatchId match data

    print_r($lastMatch);

} catch (Exception $exception) {
    exit($exception->getMessage());
} catch (\Callisto\RiotApiWrapper\Exceptions\RequestExceptions $exception) {
    exit($exception->getMessage());
}
```

Return Example
--------------

[](#return-example)

```
$summoner = $raw->LOL()->Summoner('BR1')->byName('frosty');
```

```
array(7) {
    ["id"]              => string(47) "d28PpG7Udqz1DC426V0xhBcExDZ21m8eYY9Ys9zhOOsKjNM"
    ["accountId"]       => string(47) "f_WSG9mgV23Zxh132C_9d2o1DMYg3Rq9sPp_APHp1QGlcdA"
    ["puuid"]           => string(78) "oB7jr-sPTP2Vs8Y6fglY345VFRdjNfxfPoAsXI3ViJbBlAmWCvN81igfZO88Y5_5JlCQreBKKO4uA"
    ["name"]            => string(6) "frosty"
    ["profileIconId"]   => int(5490)
    ["revisionDate"]    => int(1681258365846)
    ["summonerLevel"]   => int(813)
}
```

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

[](#contributing)

Contributions are welcome! If you find a bug or have a feature request, please open an issue.

License
-------

[](#license)

RAW is open-source software licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~19 days

Total

4

Last Release

1112d ago

Major Versions

1.0.0 → 2.0.02023-04-12

### Community

Maintainers

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

---

Top Contributors

[![Callisto01](https://avatars.githubusercontent.com/u/25828723?v=4)](https://github.com/Callisto01 "Callisto01 (14 commits)")

---

Tags

apileague-of-legendsphpriot-apiriot-games-apitfttft-apivalorantwrapper

### Embed Badge

![Health badge](/badges/callisto-riot-api-wrapper/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51090.8k2](/packages/web-auth-webauthn-framework)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

65474.5k9](/packages/web-auth-webauthn-symfony-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M517](/packages/shopware-core)

PHPackages © 2026

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