Main high-level class for services provided by the API wrapper.
package |
petrepatrasc\BlizzardApiBundle\Service |
---|
__construct(\petrepatrasc\BlizzardApiBundle\Service\CallService $callService = null)
\petrepatrasc\BlizzardApiBundle\Service\CallService
The service that makes the actual API calls. As long as the API stays read-only, it will strictly be used as an extra dependency in order to mock the call to the WS.
getPlayerProfile(string $region, int $battleNetId, string $playerName, int $realm = 1) : \petrepatrasc\BlizzardApiBundle\Entity\Player
string
The region where the request should be made. Please use the Region class for consistency with future releases.
int
The Battle.NET identifier of a player.
string
The display name of the player.
int
The realm where the request should be made (defaults to 1).
\petrepatrasc\BlizzardApiBundle\Entity\Player
getPlayerLatestMatches(string $region, int $battleNetId, string $playerName, int $realm = 1) : array
string
The region where the request should be made. Please use the Region class for consistency with future releases.
int
The Battle.NET identifier of a player.
string
The display name of the player.
int
The realm where the request should be made (defaults to 1).
array
An array containing Entity\Match entries.
getPlayerLaddersInformation(string $region, int $battleNetId, string $playerName, int $realm = 1) : \petrepatrasc\BlizzardApiBundle\Entity\Player\Ladder
string
The region where the request should be made. Please use the Region class for consistency with future releases.
int
The Battle.NET identifier of a player.
string
The display name of the player.
int
The realm where the request should be made (defaults to 1).
\petrepatrasc\BlizzardApiBundle\Entity\Player\Ladder
getGrandmasterLeagueInformation(string $region, bool $previousSeason = false) : array
string
The region where the request should be made. Please use the Region class for consistency with future releases.
bool
Whether the information should be for the previous season or not.
array
Array containing all of the ladder members as LadderPosition instances.
getLeagueInformation(string $region, int $id) : array
string
The region where the request should be made. Please use the Region class for consistency with future releases.
int
The ID of the league.
array
getRewardsInformation(string $region) : \petrepatrasc\BlizzardApiBundle\Entity\Reward\Information
string
The region where the request should be made. Please use the Region class for consistency with future releases.
\petrepatrasc\BlizzardApiBundle\Entity\Reward\Information
getAchievementsInformation(string $region) : \petrepatrasc\BlizzardApiBundle\Entity\Achievement\Information
string
The region where the request should be made. Please use the Region class for consistency with future releases.
\petrepatrasc\BlizzardApiBundle\Entity\Achievement\Information
getLeagueInformationWrapper(string $region, array $parameters) : array
string
The region where the request should be made. Please use the Region class for consistency with future releases.
array
The parameters that should be passed to the league API method.
array
Array containing all of the ladder members as LadderPosition instances.
makeCall(string $region, string $apiMethod, array $params = array(), bool $trailingSlash = true) : array
throws | |
---|---|
string
The region where the request should be made. Please use the Region class for consistency with future releases.
string
The API method that should be called.
array
The parameters that should be attached to the method call.
bool
Whether or not to include a trailing slash in the request (makes a large difference)
array
JSON decoded array of the response.
getNormalisedPlayerProfileArray(array $apiData = array()) : array
array
The data that has been provided by the API and that should overwrite the default data.
array
The API data, merged with the default data, into a normalised JSON decoded response.
API_PROFILE_METHOD
todo |
In the future, these should sit in a configuration file somewhere. |
---|---|
API_LADDER_METHOD
API_REWARDS_METHOD
API_ACHIEVEMENTS_METHOD
callService :
var |
CallService |
---|---|