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. [API Development](/categories/api)
4. /
5. sct/league

ActiveLibrary[API Development](/categories/api)

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 2w 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 66% 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

4530d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/234213?v=4)[Ryan Cohen](/maintainers/sct)[@sct](https://github.com/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

[rackspace/php-opencloud

PHP SDK for Rackspace/OpenStack APIs

4566.0M38](/packages/rackspace-php-opencloud)[cdaguerre/php-trello-api

Trello API v2 client

256677.1k3](/packages/cdaguerre-php-trello-api)[dchesterton/marketo-rest-api

A PHP client for the Marketo.com REST API

41844.4k1](/packages/dchesterton-marketo-rest-api)[carlosio/geckoboard

A PHP library for dealing with Geckoboard API (http://www.geckoboard.com)

40172.9k](/packages/carlosio-geckoboard)[teepluss/api

Laravel 4 Internal Request (HMVC)

7034.1k](/packages/teepluss-api)[jlinn/mandrill-api-php

A PHP client library for Mandrill's REST API

24120.2k](/packages/jlinn-mandrill-api-php)

PHPackages © 2026

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