PHPackages                             tulanowski/php-riot-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. tulanowski/php-riot-api

ActiveLibrary[API Development](/categories/api)

tulanowski/php-riot-api
=======================

PHP Wrapper for Riot Games API

012PHP

Since Jun 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/tulanowski/php-riot-api)[ Packagist](https://packagist.org/packages/tulanowski/php-riot-api)[ RSS](/packages/tulanowski-php-riot-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-riot-api
============

[](#php-riot-api)

PHP Wrapper for Riot Games API allows you to quickly make calls to the RIOT API with a proper API Key. Key features include caching (if enabled) and rate limiting. Simply replace API\_KEY\_HERE with your API key from [Riot Games](http://developer.riotgames.com/sign-in?fhs=true).

Testing.php is a simple testing class that shows how to call all the functions.

Getting Started
---------------

[](#getting-started)

- Replace INSERT\_API\_KEY\_HERE
- Create folder called 'cache' wherever the script is (make sure it's writeable by php-riot-api)
- Create an instance of riotapi - $instance = new riotapi($region);
- $region can be na, euw, eune, br, tr (br/tr only can call getLeague() and getTeam() functions)
- Make Calls to the functions listed below and receive JSON data
- Caching is done locally, instantiate php-riot-api with "new riotapi('na', new FileSystemCache('cache/'));" to create a cache in the subfolder 'cache'
- DECODE\_ENABLED is true by default. If you want your returns to be pure JSON and not an associative array, set it to false
- Take a look at testing.php for example code, including error handling, caching

Functions
---------

[](#functions)

```
//Returns all champion information.
getChampion();

// Returns all free champions.
getFreeChampions();

//performs a static call. Not counted in rate limit.
getStatic($call, $id);

//New Riot API call. Returns match details given a match id.
getMatch($matchId);

//Returns a user's matchHistory given their summoner id.
getMatchHistory($summoner_id);

//Returns game statistics given a summoner's id.
getGame($summoner_id);

//Returns the league of a given summoner.
getLeague($summoner_id);
getLeague($summoner_id, "entry");

//Returns league information given a *list* of teams.
getLeagueByTeam($team_ids);

//Returns the challenger ladder.
getChallenger();

//Returns a summoner's stats given summoner id.
getStats($summoner_id);
getStats($summoner_id,'ranked');

//returns a summoner's id
getSummonerId($summoner_name);

//Returns summoner info given summoner id.
getSummoner($summoner_id);
getSummoner($summoner_id,'masteries');
getSummoner($summoner_id,'runes');
getSummoner($summoner_id,'name');

//Gets a summoner's info given their name, instead of id.
getSummonerByName($summoner_name);

//Gets the teams of a summoner, given summoner id.
getTeam($summoner_id);

```

Not Complete
------------

[](#not-complete)

Region Checking - Some functions are only available in certain regions and not in others.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.3% 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.

### Community

Maintainers

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

---

Top Contributors

[![kevinohashi](https://avatars.githubusercontent.com/u/1203330?v=4)](https://github.com/kevinohashi "kevinohashi (38 commits)")[![ahubers](https://avatars.githubusercontent.com/u/7432558?v=4)](https://github.com/ahubers "ahubers (12 commits)")[![Supericy](https://avatars.githubusercontent.com/u/2945983?v=4)](https://github.com/Supericy "Supericy (5 commits)")[![tulanowski](https://avatars.githubusercontent.com/u/3034323?v=4)](https://github.com/tulanowski "tulanowski (3 commits)")[![gaetanm](https://avatars.githubusercontent.com/u/2548394?v=4)](https://github.com/gaetanm "gaetanm (2 commits)")[![xorinzor](https://avatars.githubusercontent.com/u/4212335?v=4)](https://github.com/xorinzor "xorinzor (1 commits)")[![coltcarder](https://avatars.githubusercontent.com/u/4778761?v=4)](https://github.com/coltcarder "coltcarder (1 commits)")[![playmono](https://avatars.githubusercontent.com/u/1773174?v=4)](https://github.com/playmono "playmono (1 commits)")

### Embed Badge

![Health badge](/badges/tulanowski-php-riot-api/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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