PHPackages                             sct/league - 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. sct/league

ActiveLibrary

sct/league
==========

PHP Library to access to the official League of Legends API

1.4.1(12y ago)10731[1 PRs](https://github.com/sct/League/pulls)MITPHPPHP &gt;=5.3.0

Since Dec 20Pushed 7y ago4 watchersCompare

[ Source](https://github.com/sct/League)[ Packagist](https://packagist.org/packages/sct/league)[ Docs](https://github.com/sct/League)[ RSS](/packages/sct-league/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

"League" PHP API Library
========================

[](#league-php-api-library)

A simple PHP library for the official League of Legends API

Still heavily in development. Currently supports getting Summoner data and Champion data. Can also request specific summoner stats for champions or game types.

Requirements
------------

[](#requirements)

- PHP &gt;=5.3
- PHP Curl Extension

Installation
------------

[](#installation)

You can install this library using composer. Learn about composer @ [getcomposer.org](http://getcomposer.org/)

1. Require the package in your composer.json

    "sct/league": "dev-master"
2. Run Composer to install the new requirement

    php composer.phar install or

    php composer.phar update

Now make sure you are using the composer autoload in your project:

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

use sct\League\Summoner;

$summoner = new Summoner("summoner", "region", "APIKEY");

```

And thats it you are good to go.

Changes
-------

[](#changes)

In version 1.4 the Summoner constructor was changed. You should use the factory method in Summoner to create Summoner objects. The factory supports requesting mulitple Summoners with one request.

Example Usage for multiple summoners

```
$summoners = Summoner::factory(array("Dyrus", "Xpecial"), "na", "api_key");

$summoners['Dyrus']->getSummonerLevel();

```

Usage
-----

[](#usage)

Getting Summoner Data

```
$dyrus = Summoner::factory("Dyrus", "na", "api_key");

$dyrus->getSummonerLevel();
$dyrus->getStats();
$dyrus->getRankedStats();
$dyrus->getStatsForGameType(GameType::Unranked);
$dyrus->getStatsForChampionByName("Darius");
$dyrus->getMatchHistory();
$dyrus->getMasteries();
$dyrus->getRunes();

// New Methods
$dyrus->getLeague();
$dyrus->getTeams();

```

Getting Champion Data

```
Champions::loadChampions("na", "api key");

$anivia = Champions::getChampion("Anivia");

$anivia->getActive();
$anivia->getRanks();
$anivia->getRankedPlayEnabled();
$anivia->getFreeToPlay();

```

License
-------

[](#license)

This project is licensed under the MIT License. Feel free to do whatever you want with it.

If you do use this project, it would be great if you could add credit (although you don't have to!) Also I would love to see where and how you are using the project, so send me a message and let me know where I can check it out!

*This product is not endorsed, certified or otherwise approved in any way by Riot Games, Inc. or any of its affiliates.*

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~11 days

Total

5

Last Release

4482d ago

### Community

Maintainers

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

---

Top Contributors

[![sct](https://avatars.githubusercontent.com/u/234213?v=4)](https://github.com/sct "sct (23 commits)")[![tristanbes](https://avatars.githubusercontent.com/u/346010?v=4)](https://github.com/tristanbes "tristanbes (1 commits)")

### Embed Badge

![Health badge](/badges/sct-league/health.svg)

```
[![Health](https://phpackages.com/badges/sct-league/health.svg)](https://phpackages.com/packages/sct-league)
```

###  Alternatives

[coincheck/coincheck

Bindings of coincheck API

202.2k](/packages/coincheck-coincheck)

PHPackages © 2026

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