Property | Type | Description | |
---|---|---|---|
$api | Provides access to the api object to perform requests on different api endpoints. | ||
$cache | LeagueWrap\CacheInterface | This is the cache container that we intend to use. | |
$client | LeagueWrap\ClientInterface | The client used to communicate with the api. | |
$collection | LeagueWrap\Limit\Collection | The collection of limits to be used on this api. | |
$defaultRemember | integer | The amount of time we intend to remember the response for. | |
$key | The key to be used by the api. | ||
$permittedRegions | A list of all permitted regions for this API call. Leave it empty to not lock out any region string. | ||
$requests | A count of the amount of API request this object has done so far. | ||
$responseErrors | List of http error response codes and associated erro message with each code. | ||
$seconds | integer | The amount of seconds to keep things in cache | |
$version | The version we want to use. If null use the first version in the array. |
Method | Description | |
---|---|---|
__construct ( LeagueWrap\ClientInterface $client, LeagueWrap\Limit\Collection $collection, LeagueWrap\Api $api ) | Default DI constructor. | |
getDomain ( ) : String | ||
getRegion ( ) : |
||
getRequestCount ( ) : integer | Returns the amount of requests this object has done to the api so far. | |
remember ( integer $seconds = null, LeagueWrap\CacheInterface $cache = null ) | Sets the amount of seconds we should remember the response for. | |
selectVersion ( string $version ) : boolean | $this | Select the version of the api you wish to query. | |
setKey ( string $key ) | Set the key to be used in the api. |
Method | Description | |
---|---|---|
attachResponse ( mixed $identity, mixed $response, string $key ) : boolean | Attempts to attach the response to a summoner object. | |
attachResponses ( array | LeagueWrap\Dto\Summoner $identities, mixed $responses, string $key ) : boolean | Attempts to attach all the responses to the correct summoner. | |
attachStaticDataToDto ( LeagueWrap\Dto\AbstractDto $dto ) : LeagueWrap\Dto\AbstractDto | Will attempt to attach any static data to the given dto if the attach static data flag is set. | |
checkResponseErrors ( |
Checks the response for Http errors. | |
clientRequest ( boolean $static, string $uri, array $params ) : |
Make the actual request. | |
extractId ( LeagueWrap\Dto\Summoner | integer $identity ) : integer | Attempts to extract an ID from the object/value given | |
extractIds ( mixed $identities ) : array | Attempts to extract an ID from the array given. | |
getVersion ( ) : string | Get the version string. | |
request ( string $path, array $params = [], boolean $static = false, boolean $isVersionized = true ) : mixed | Wraps the request of the api in this method. |
public __construct ( LeagueWrap\ClientInterface $client, LeagueWrap\Limit\Collection $collection, LeagueWrap\Api $api ) | ||
$client | LeagueWrap\ClientInterface | |
$collection | LeagueWrap\Limit\Collection | |
$api | LeagueWrap\Api |
protected attachStaticDataToDto ( LeagueWrap\Dto\AbstractDto $dto ) : LeagueWrap\Dto\AbstractDto | ||
$dto | LeagueWrap\Dto\AbstractDto | |
return | LeagueWrap\Dto\AbstractDto |
protected checkResponseErrors ( |
||
$response |
protected extractIds ( mixed $identities ) : array | ||
$identities | mixed | |
return | array |
abstract public getDomain ( ) : String | ||
return | String | domain used for the request |
public getRequestCount ( ) : integer | ||
return | integer |
protected getVersion ( ) : string | ||
return | string |
public selectVersion ( string $version ) : boolean | $this | ||
$version | string | |
return | boolean | $this |
protected $api |
protected CacheInterface,LeagueWrap $cache | ||
return | LeagueWrap\CacheInterface |
protected ClientInterface,LeagueWrap $client | ||
return | LeagueWrap\ClientInterface |
protected Collection,LeagueWrap\Limit $collection | ||
return | LeagueWrap\Limit\Collection |
protected int $defaultRemember | ||
return | integer |
protected $permittedRegions |
protected $requests |
protected $responseErrors |
protected int $seconds | ||
return | integer |