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\CallServiceThe 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
stringThe region where the request should be made. Please use the Region class for consistency with future releases.
intThe Battle.NET identifier of a player.
stringThe display name of the player.
intThe 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
stringThe region where the request should be made. Please use the Region class for consistency with future releases.
intThe Battle.NET identifier of a player.
stringThe display name of the player.
intThe realm where the request should be made (defaults to 1).
arrayAn array containing Entity\Match entries.
getPlayerLaddersInformation(string $region, int $battleNetId, string $playerName, int $realm = 1) : \petrepatrasc\BlizzardApiBundle\Entity\Player\Ladder
stringThe region where the request should be made. Please use the Region class for consistency with future releases.
intThe Battle.NET identifier of a player.
stringThe display name of the player.
intThe realm where the request should be made (defaults to 1).
\petrepatrasc\BlizzardApiBundle\Entity\Player\Ladder
getGrandmasterLeagueInformation(string $region, bool $previousSeason = false) : array
stringThe region where the request should be made. Please use the Region class for consistency with future releases.
boolWhether the information should be for the previous season or not.
arrayArray containing all of the ladder members as LadderPosition instances.
getLeagueInformation(string $region, int $id) : array
stringThe region where the request should be made. Please use the Region class for consistency with future releases.
intThe ID of the league.
array
getRewardsInformation(string $region) : \petrepatrasc\BlizzardApiBundle\Entity\Reward\Information
stringThe 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
stringThe 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
stringThe region where the request should be made. Please use the Region class for consistency with future releases.
arrayThe parameters that should be passed to the league API method.
arrayArray containing all of the ladder members as LadderPosition instances.
makeCall(string $region, string $apiMethod, array $params = array(), bool $trailingSlash = true) : array
| throws | |
|---|---|
stringThe region where the request should be made. Please use the Region class for consistency with future releases.
stringThe API method that should be called.
arrayThe parameters that should be attached to the method call.
boolWhether or not to include a trailing slash in the request (makes a large difference)
arrayJSON decoded array of the response.
getNormalisedPlayerProfileArray(array $apiData = array()) : array
arrayThe data that has been provided by the API and that should overwrite the default data.
arrayThe 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 |
|---|---|