I just started with the Riot API, and I am stuck in getting summoners by their ranking. I used the getChampion()
function but it retrieves data different from other sites which are already running.
I use it like this:
<?php
include('php-riot-api.php');
include('FileSystemCache.php');
//testing classes
//using double quotes seems to make all names work (see issue: https://github.com/kevinohashi/php-riot-api/issues/33)
$summoner_name = "RiotSchmick";
$summoner_id = 585897;
$test = new riotapi('na');
$testCache = new riotapi('na', new FileSystemCache('cache/'));
$r = $test->getChampion(); echo "<pre>"; print_r($r);echo "</pre>";
this fetch array like this
[champions] => Array
(
[0] => Array
(
[id] => 266
[active] => 1
[botEnabled] =>
[freeToPlay] => 1
[botMmEnabled] =>
[rankedPlayEnabled] => 1
)
[1] => Array
(
[id] => 103
[active] => 1
[botEnabled] =>
[freeToPlay] =>
[botMmEnabled] =>
[rankedPlayEnabled] => 1
) ..................
After I used $r->getSummoner(266); // 103
and all id I get from above array. But the summoners names I get are different from other running sites like http://na.op.gg/ranking/ladder/ and http://quickfind.kassad.in/rankings/na (both these sites have the same data but mine is different).