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

ActiveLibrary[API Development](/categories/api)

elenotrindade/php-riot-api
==========================

A PHP wrapper for the Riot Games API

01PHP

Since Feb 12Pushed 1y agoCompare

[ Source](https://github.com/elenotrindade/php-riot-api)[ Packagist](https://packagist.org/packages/elenotrindade/php-riot-api)[ RSS](/packages/elenotrindade-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($platform);
- $platform can be na1, euw1, eun1, br1, ru, kr, oc1, la1, la2, jp1, pbe1, tr1 (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('na1', 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();

//Change platform
setRegion($region);

// Returns all free champions.
getChampion(true);
getFreeChampions();

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

//Returns match details including timeline (if exists) given a match id.
//Use with care, rate limiting is not ready for this function
getMatch($matchId);
//Returns match details given a match id, without timeline.
getMatch($matchId, false);

//Returns timeline of a match
getTimeline($matchId)

//Returns a user's matchList given their account id.
public function getMatchList($accountId,$params=null)

//Returns the league of a given summoner.
getLeague($summoner_id);
getLeaguePosition($summoner_id);

//Returns the challenger ladder.
getChallenger($queue = "RANKED_SOLO_5x5");
//Returns the master ladder.
getMaster($queue = "RANKED_SOLO_5x5");

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

//Returns summoner info given summoner id.
getSummoner($summoner_id);
//Returns summoner masteries given summoner id.
getMasteries($summoner_id);
//Returns summoner runes given summoner id.
getRunes($summoner_id);

//Returns summoner info given account id.
getSummoner($accountId);

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

//Return details of an array of matches
//Use with care, rate limiting is not ready for this function
getMatches($ids, $includeTimeline = true)

```

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

[](#not-complete)

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

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 59.5% 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/cb1e7e3b10e1750dc0f4c814b3a81ab92a99faa2d3e8aa46e828094e5df42d31?d=identicon)[elenotrindade](/maintainers/elenotrindade)

---

Top Contributors

[![kevinohashi](https://avatars.githubusercontent.com/u/1203330?v=4)](https://github.com/kevinohashi "kevinohashi (47 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)")[![sylven](https://avatars.githubusercontent.com/u/9272552?v=4)](https://github.com/sylven "sylven (5 commits)")[![Canisback](https://avatars.githubusercontent.com/u/1747029?v=4)](https://github.com/Canisback "Canisback (2 commits)")[![gaetanm](https://avatars.githubusercontent.com/u/2548394?v=4)](https://github.com/gaetanm "gaetanm (2 commits)")[![primus852](https://avatars.githubusercontent.com/u/5185509?v=4)](https://github.com/primus852 "primus852 (1 commits)")[![coltcarder](https://avatars.githubusercontent.com/u/4778761?v=4)](https://github.com/coltcarder "coltcarder (1 commits)")[![xorinzor](https://avatars.githubusercontent.com/u/4212335?v=4)](https://github.com/xorinzor "xorinzor (1 commits)")[![Derpthemeus](https://avatars.githubusercontent.com/u/16827162?v=4)](https://github.com/Derpthemeus "Derpthemeus (1 commits)")[![elenotrindade](https://avatars.githubusercontent.com/u/32276516?v=4)](https://github.com/elenotrindade "elenotrindade (1 commits)")[![playmono](https://avatars.githubusercontent.com/u/1773174?v=4)](https://github.com/playmono "playmono (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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