Kshabazz\BattleNet\D3\Connections\Connection

class Connection

Interface Resource

getHero($pHeroId)

Request Hero JSON from Battle.Net. ex: http://us.battle.net/api/d3/profile/<battleNetIdName>-<battleNetIdNumber>/hero/<hero-id> Note: Leave off the trailing ‘/’ when setting

Parameters:
  • $pHeroId
Returns:

string|null

getItem($pItemId)

Get item JSON from Battle.Net D3 API. ex: http://us.battle.net/api/d3/data/item/COGHsoAIEgcIBBXIGEoRHYQRdRUdnWyzFB2qXu51MA04kwNAAFAKYJMD

Parameters:
  • $pItemId
Returns:

string|null

getItemsAsModels($pItemHashes)

For each item the hero in the array construct an ModelItem and return them as an array.

Parameters:
  • $pItemHashes (array) – List of item hashes.
Returns:

array|null

getProfile()

ex: http://us.battle.net/api/d3/profile/<battleNetIdName>-<battleNetIdNumber>/

Returns:string|null