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

ActiveLibrary[API Development](/categories/api)

miguelfreire/riot-api
=====================

v1.2(12y ago)0251MITPHPPHP &gt;=5.3.0

Since Dec 11Pushed 12y ago1 watchersCompare

[ Source](https://github.com/MiguelFreire/php-riotapi)[ Packagist](https://packagist.org/packages/miguelfreire/riot-api)[ RSS](/packages/miguelfreire-riot-api/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Riot API PHP (DEPRECATED) DO NOT USE
====================================

[](#riot-api-php-deprecated-do-not-use)

Riot API ported to PHP! Fully compatible with composer!

Available Functions
===================

[](#available-functions)

getChampions($free, $region)

```
$free 		-> bool

$region 	-> string

```

getSummonerBy($summoner, $by, $region)

```
$summoner 	-> string or int

$by 		-> string -> "id" or "name"

$region 	-> string

```

getSummoner($summoner\_id, $options, $region)

```
$summoner_id 	-> int

$options 	-> string -> "runes" or "masteries" or "name"

$region 	-> string

```

getRecentGames($summoner\_id, $region)

```
$summoner_id	-> int

$region 	-> string

```

getLeagues($summoner\_id, $region)

```
$summoner_id	-> int

$region 	-> string

```

getPlayerStats($summoner\_id, $options, $season, $region) $summoner\_id -&gt; int

```
$options 	-> string -> "summary" or "ranked"

$season		-> string -> "SEASON3" or "SEASONX"

$region 	-> string

```

getTeam()

```
$summoner_id	-> int

$region 	-> string

```

setKey($key)

```
$key 		-> string

```

setRegion($region)

```
$region		-> string

```

Available Regions and their functions:
======================================

[](#available-regions-and-their-functions)

### Regions

[](#regions)

RegionsTagFunctionsEurope Westeuwchampions, game, league, stats, summoner, teamEurope Nordic and Easteunechampions, game, league, stats, summoner, teamNorth Americanachampions, game, league, stats, summoner, teamTurkeytrleagueBrasilbrleagueHow to use
==========

[](#how-to-use)

1-Create a composer project

2- In a new folder inside your composer project create a php file

3- Include composer's autoload and create an RiotAPI instance

```
require_once __DIR__ . '/../vendor/autoload.php';
use RiotAPI\RiotAPI;
$foo = new RiotAPI;
$foo->setKey('Your-API-KEY');
$foo->setRegion('na');
$foo->getChampions();

```

Composer Require
================

[](#composer-require)

```
"require": {
    "miguelfreire/riot-api": "v1.0"
},

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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 ~1 days

Total

2

Last Release

4581d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2151397?v=4)[Miguel Freire](/maintainers/MiguelFreire)[@MiguelFreire](https://github.com/MiguelFreire)

---

Top Contributors

[![MiguelFreire](https://avatars.githubusercontent.com/u/2151397?v=4)](https://github.com/MiguelFreire "MiguelFreire (8 commits)")

### Embed Badge

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

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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