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 2d 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 43% 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

4535d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f81de84b771d39e3d71c69cbbc6bf1d6aaef87bf14e6989d1ff3fb28e6c8750?d=identicon)[MiguelFreire](/maintainers/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

[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)[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)
