Skip to content
Permalink
Browse files

Remove deprecated League v4 endpoint and add new one

  • Loading branch information...
supergrecko committed Jun 13, 2019
1 parent 8eac416 commit 75e61f143b8583e4c6f1b18b077cd46b96ab9cd4
@@ -0,0 +1,29 @@
<?php
namespace RiotQuest\Components\Framework\Collections;
/**
* Class LeagueEntry
*
* @see https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntriesForSummoner
*
* @property string $queueType
* @property string $summonerName
* @property boolean $hotStreak
* @property MiniSeries $miniSeries
* @property int $wins
* @property boolean $veteran
* @property int $losses
* @property string $rank
* @property string $leagueId
* @property boolean $inactive
* @property boolean $freshBlood
* @property string $tier
* @property string $summonerId
* @property int $leaguePoints
*
* @package RiotQuest\Tests\Collections
*/
class LeagueEntry extends Collection {
}
@@ -0,0 +1,16 @@
<?php
namespace RiotQuest\Components\Framework\Collections;
/**
* Class LeagueEntryList
*
* @see https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntriesForSummoner
*
* @list LeagueEntry
*
* @package RiotQuest\Tests\Collections
*/
class LeagueEntryList extends Collection {
}

This file was deleted.

This file was deleted.

@@ -29,7 +29,7 @@ public function positions(string $id)
{
return Request::make(['league', __FUNCTION__])
->useStandard()
->setDestination('https://{region}.api.riotgames.com/lol/league/v4/positions/by-summoner/{id}')
->setDestination('https://{region}.api.riotgames.com/lol/league/v4/entries/by-summoner/{id}')
->setMethod('GET')
->setArguments(['region' => $this->region, 'id' => $id])
->setTtl($this->ttl)
@@ -2,20 +2,18 @@
namespace RiotQuest\Components\Framework\Engine;
use ReflectionClass;
use RiotQuest\Components\Framework\Collections\ChampionInfo;
use RiotQuest\Components\Framework\Collections\ChampionMastery;
use RiotQuest\Components\Framework\Collections\ChampionMasteryList;
use RiotQuest\Components\Framework\Collections\Collection;
use RiotQuest\Components\Framework\Collections\CurrentGameInfo;
use RiotQuest\Components\Framework\Collections\FeaturedGames;
use RiotQuest\Components\Framework\Collections\League;
use RiotQuest\Components\Framework\Collections\LeagueEntryList;
use RiotQuest\Components\Framework\Collections\Match;
use RiotQuest\Components\Framework\Collections\MatchHistory;
use RiotQuest\Components\Framework\Collections\MatchTimeline;
use RiotQuest\Components\Framework\Collections\ShardStatus;
use RiotQuest\Components\Framework\Collections\Summoner;
use RiotQuest\Components\Framework\Collections\LeaguePositionList;
/**
* Class Library
@@ -111,12 +109,12 @@ class Library
'rotation' => ChampionInfo::class
],
'league' => [
'positions' => LeaguePositionList::class,
'positions' => LeagueEntryList::class,
'id' => League::class,
'grandmaster' => League::class,
'challenger' => League::class,
'master' => League::class,
'entries' => LeaguePositionList::class
'entries' => LeagueEntryList::class
],
'status' => [
'shard' => ShardStatus::class
@@ -0,0 +1 @@
{"queueType":"string","summonerName":"string","hotStreak":"boolean","miniSeries":{"progress":"string","losses":"int","target":"int","wins":"int","_class":"\\RiotQuest\\Components\\Framework\\Collections\\MiniSeries"},"wins":"int","veteran":"boolean","losses":"int","rank":"string","leagueId":"string","inactive":"boolean","freshBlood":"boolean","tier":"string","summonerId":"string","leaguePoints":"int","_class":"\\RiotQuest\\Components\\Framework\\Collections\\LeagueEntry"}
@@ -0,0 +1 @@
{"_list":{"queueType":"string","summonerName":"string","hotStreak":"boolean","miniSeries":{"progress":"string","losses":"int","target":"int","wins":"int","_class":"\\RiotQuest\\Components\\Framework\\Collections\\MiniSeries"},"wins":"int","veteran":"boolean","losses":"int","rank":"string","leagueId":"string","inactive":"boolean","freshBlood":"boolean","tier":"string","summonerId":"string","leaguePoints":"int","_class":"\\RiotQuest\\Components\\Framework\\Collections\\LeagueEntry"},"_class":"\\RiotQuest\\Components\\Framework\\Collections\\LeagueEntryList"}

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 75e61f1

Please sign in to comment.
You can’t perform that action at this time.