A PHP library for the Riot Games API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
README.md
composer.json
phpunit.xml

README.md

PHP library for the Riot Games API

Work in progress: Only Champion, Champion Mastery, Static Data, and Summoner API methods have been implemented so far.

Structure

Each component of the Riot Games API is separated into its own class. This helps with readability and is easy to extend whenever new components are added.

Examples

To retrieve summoner information

$summoner_api = new RiotSummoner($your_api_key);
$summoner = $summoner_api->byName('RiotSchmick');

The returned object:

stdClass Object
(
    [id] => 88790059
    [accountId] => 239976345
    [name] => RiotSchmick
    [profileIconId] => 20
    [revisionDate] => 1505756776000
    [summonerLevel] => 16
)

To retrieve champion information

  $champion_api = new RiotChampion($your_api_key);
  $champion = $champion_api->byId(22);
stdClass Object
(
    [id] => 22
    [active] => 1
    [botEnabled] => 1
    [freeToPlay] =>
    [botMmEnabled] => 1
    [rankedPlayEnabled] => 1
)

To retrieve static data, such as champion information

  $riot_static_api = new RiotStatic($your_api_key);
  $champions = $riot_static_api->champions();