1. Go to this page and download the library: Download proveyourskillz/lol-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
proveyourskillz / lol-api example snippets
$api = new PYS\LolApi\Api(API_KEY);
use PYS\LolApi\ApiRequest\Region;
$summoner = $api->summoner(Region::EUW, $summonerId);
// You can get summoner in several ways by passing type in third argument
// Default version: summoner, you can ommit it
$summonerById = $api->summoner($region, $summonerId);
$summonerByAccount = $api->summoner($region, $accountId, 'account');
$summonerByName = $api->summoner($region, $name, 'name');
use PYS\LolApi\ApiRequest\MatchListRequest;
use PYS\LolApi\ApiRequest\Query\MatchListQuery;
$api = new PYS\LolApi\Api($API_KEY);
$query = new MatchListQuery;
$request = new MatchListRequest($region, $accountId);
$request->setQuery($query->lastMatches(1));
$matchList = $api->make($request);
// Setup query object to get last 5 matches in 24 hours
$query = new MatchListQuery;
$query
->fromDate(new DateTime('-24 hours'))
->lastMatches(5);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.