PHP Class LeagueWrap\Api\Staticdata

Inheritance: extends AbstractApi
Datei anzeigen Open project: paquettg/leaguewrap

Protected Properties

Property Type Description
$DDversion string The version of League of Legends that we want data from. By default it is not passed (null).
$dataById array A list of all calls that require to get the data by Id
$defaultRemember integer The amount of time we intend to remember the response for.
$locale string The locale you want the response in. By default it is not passed (null).
$permittedRegions array A list of all permitted regions for the Staticdata api call.
$versions array Valid version for this api call.

Public Methods

Method Description
getChampion ( integer $championId, mixed $data = null ) : LeagueWrap\Dto\StaticData\ChampionList | Champion Gets the static champion data of all champions if $championId is null.
getChampions ( mixed $data = null ) : LeagueWrap\Dto\StaticData\ChampionList Gets all static champion data with the given $data option.
getDomain ( ) : String
getItem ( integer $itemId, mixed $data = null ) : LeagueWrap\Dto\StaticData\Item | LeagueWrap\Dto\StaticData\ItemList Gets the static item data of all items if $itemId is null.
getItems ( mixed $data = null ) : LeagueWrap\Dto\StaticData\ItemList Gets static data on all items.
getMasteries ( mixed $data = null ) : LeagueWrap\Dto\StaticData\MasteryList Gets static data on all masteries.
getMastery ( integer $masteryId, mixed $data = null ) : LeagueWrap\Dto\StaticData\MasteryList | LeagueWrap\Dto\StaticData\Mastery Gets the mastery data of all masteries if $masteryId is null.
getRealm ( ) : LeagueWrap\Dto\StaticData\Realm Get the realm information for the current region.
getRune ( integer $runeId, mixed $data = null ) : LeagueWrap\Dto\StaticData\RuneList | LeagueWrap\Dto\StaticData\Rune Gets the rune data of all runes if $runeId is null.
getRunes ( mixed $data = null ) : LeagueWrap\Dto\StaticData\RuneList Gets static data on all runes.
getSummonerSpell ( integer $summonerSpellId, mixed $data = null ) : LeagueWrap\Dto\StaticData\SummonerSpell | LeagueWrap\Dto\StaticData\SummonerSpellList Gets the summoner spell data of all spells if $summonerSpellId is null If $summonerSpellId is set it will attept to get info for that spell only.
getSummonerSpells ( mixed $data = null ) : LeagueWrap\Dto\StaticData\SummonerSpellList Gets static data on all summoner spells.
setDDversion ( string $DDversion = null ) Sets the DDversion to be used in the query. Null will return the most recent version.
setLocale ( string $locale ) Sets the locale the data should be returned in. Null returns the default local for that region.
version ( ) : Array Get the version information for the current region.

Protected Methods

Method Description
appendId ( mixed $requestId ) : boolean Check if we should append the id to the end of the url or not.
dataById ( $name ) : boolean Check if we need the data by Id
makeRequest ( string $path, mixed $requestId, array $params ) : array Make the request given the proper information.
setUpParams ( string $name = '', mixed $requestId = null, mixed $data = null, string $listData = '', string $itemData = '' ) : array Set up the boiler plate for the param array for any static data call.

Method Details

appendId() protected method

Check if we should append the id to the end of the url or not.
protected appendId ( mixed $requestId ) : boolean
$requestId mixed
return boolean

dataById() protected method

Check if we need the data by Id
protected dataById ( $name ) : boolean
$name string
return boolean

getChampion() public method

If $championI is set it will attempt to get info for that champion only.
public getChampion ( integer $championId, mixed $data = null ) : LeagueWrap\Dto\StaticData\ChampionList | Champion
$championId integer
$data mixed
return LeagueWrap\Dto\StaticData\ChampionList | Champion

getChampions() public method

Gets all static champion data with the given $data option.
public getChampions ( mixed $data = null ) : LeagueWrap\Dto\StaticData\ChampionList
$data mixed
return LeagueWrap\Dto\StaticData\ChampionList

getDomain() public method

public getDomain ( ) : String
return String domain used for the request

getItem() public method

If $itemId is set it will attempt to get info for that item only.
public getItem ( integer $itemId, mixed $data = null ) : LeagueWrap\Dto\StaticData\Item | LeagueWrap\Dto\StaticData\ItemList
$itemId integer
$data mixed
return LeagueWrap\Dto\StaticData\Item | LeagueWrap\Dto\StaticData\ItemList

getItems() public method

Gets static data on all items.
public getItems ( mixed $data = null ) : LeagueWrap\Dto\StaticData\ItemList
$data mixed
return LeagueWrap\Dto\StaticData\ItemList

getMasteries() public method

Gets static data on all masteries.
public getMasteries ( mixed $data = null ) : LeagueWrap\Dto\StaticData\MasteryList
$data mixed
return LeagueWrap\Dto\StaticData\MasteryList

getMastery() public method

If $masteryId is a set it will attempt to get info for that mastery only.
public getMastery ( integer $masteryId, mixed $data = null ) : LeagueWrap\Dto\StaticData\MasteryList | LeagueWrap\Dto\StaticData\Mastery
$masteryId integer
$data mixed
return LeagueWrap\Dto\StaticData\MasteryList | LeagueWrap\Dto\StaticData\Mastery

getRealm() public method

Get the realm information for the current region.
public getRealm ( ) : LeagueWrap\Dto\StaticData\Realm
return LeagueWrap\Dto\StaticData\Realm

getRune() public method

If $runeId is set it will attempt to get info for that rune only.
public getRune ( integer $runeId, mixed $data = null ) : LeagueWrap\Dto\StaticData\RuneList | LeagueWrap\Dto\StaticData\Rune
$runeId integer
$data mixed
return LeagueWrap\Dto\StaticData\RuneList | LeagueWrap\Dto\StaticData\Rune

getRunes() public method

Gets static data on all runes.
public getRunes ( mixed $data = null ) : LeagueWrap\Dto\StaticData\RuneList
$data mixed
return LeagueWrap\Dto\StaticData\RuneList

getSummonerSpell() public method

Gets the summoner spell data of all spells if $summonerSpellId is null If $summonerSpellId is set it will attept to get info for that spell only.
public getSummonerSpell ( integer $summonerSpellId, mixed $data = null ) : LeagueWrap\Dto\StaticData\SummonerSpell | LeagueWrap\Dto\StaticData\SummonerSpellList
$summonerSpellId integer
$data mixed
return LeagueWrap\Dto\StaticData\SummonerSpell | LeagueWrap\Dto\StaticData\SummonerSpellList

getSummonerSpells() public method

Gets static data on all summoner spells.
public getSummonerSpells ( mixed $data = null ) : LeagueWrap\Dto\StaticData\SummonerSpellList
$data mixed
return LeagueWrap\Dto\StaticData\SummonerSpellList

makeRequest() protected method

Make the request given the proper information.
protected makeRequest ( string $path, mixed $requestId, array $params ) : array
$path string
$requestId mixed
$params array
return array

setDDversion() public method

Sets the DDversion to be used in the query. Null will return the most recent version.
public setDDversion ( string $DDversion = null )
$DDversion string

setLocale() public method

Sets the locale the data should be returned in. Null returns the default local for that region.
public setLocale ( string $locale )
$locale string

setUpParams() protected method

Set up the boiler plate for the param array for any static data call.
protected setUpParams ( string $name = '', mixed $requestId = null, mixed $data = null, string $listData = '', string $itemData = '' ) : array
$name string of api call
$requestId mixed
$data mixed
$listData string
$itemData string
return array

version() public method

Get the version information for the current region.
public version ( ) : Array
return Array

Property Details

$DDversion protected_oe property

The version of League of Legends that we want data from. By default it is not passed (null).
protected string $DDversion
return string

$dataById protected_oe property

A list of all calls that require to get the data by Id
protected array $dataById
return array

$defaultRemember protected_oe property

The amount of time we intend to remember the response for.
protected int $defaultRemember
return integer

$locale protected_oe property

The locale you want the response in. By default it is not passed (null).
protected string $locale
return string

$permittedRegions protected_oe property

A list of all permitted regions for the Staticdata api call.
protected array $permittedRegions
return array

$versions protected_oe property

Valid version for this api call.
protected array $versions
return array