2017 © Pedro Peláez
 

library battlenet-api

php api for Battle.net game APIs ( https://dev.battle.net/ ).

image

mrcorex/battlenet-api

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  • Saturday, April 2, 2016
  • by mrcorex
  • Repository
  • 1 Watchers
  • 0 Stars
  • 63 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 5 % Grown

The README.md

battlenet-api

php api for Battle.net game APIs ( https://dev.battle.net/ ) - Cache built in., (*1)

Installation

Add "mrcorex/battlenet-api": "^1" to your composer.json file and run "composer update"., (*2)

Setting configuration.

Set key, server and locale., (*3)

\BattleNet\Config::setApiKey($key);
\BattleNet\Config::setServer(\BattleNet\Server::EU);
\BattleNet\Config::setLocale(\BattleNet\Locale::EN_GB);

To enable and use cache, specify path where to store cache-files (json)., (*4)

\BattleNet\Config::setCachePath('/path/to/my/cache');

Warcraft.

Example of getting character races.

$data = new \BattleNet\Warcraft\Data();
$characterRaces = $data->getCharacterRaces();

Diablo.

Example of getting data for blacksmith.

$data = new \BattleNet\Diablo\Data();
$blacksmith = $data->getArtisanBlacksmith();

StarCraft.

Example of getting data for rewards.

$data = new \BattleNet\StarCraft\Data();
$rewards = $data->getRewards();

Clearing cache.

\BattleNet\Config::clearCache('wow');

Notice that you need to specify "wow", "sc2" and "d3" to clear cache for specific game., (*5)

TODO

  • Add media-links for various thumbnails, icons etc.
  • Add support for Auth.

ChangeLog

  • 2016-04-02 1.0.0 Initial development.
  • 2016-04-02 1.1.0 Added support for StarCraft.
  • 2016-04-02 1.1.1 Added getMatches() for StarCraft.
  • 2016-04-02 1.2.0 Added support for Diablo.
  • 2016-04-02 1.3.0 Added support for changing cache-lifetime (short/long).
  • 2016-04-02 1.4.0 Refactored cache handler for general usage.

The Versions

02/04 2016

dev-master

9999999-dev

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

MIT

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet

02/04 2016

dev-develop

dev-develop

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

MIT

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet

02/04 2016

1.4.0

1.4.0.0

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

MIT

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet

02/04 2016

1.3.0

1.3.0.0

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet

02/04 2016

1.2.0

1.2.0.0

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet

02/04 2016

1.1.1

1.1.1.0

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet

02/04 2016

1.1.0

1.1.0.0

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet

02/04 2016

1.0.0

1.0.0.0

php api for Battle.net game APIs ( https://dev.battle.net/ ).

  Sources   Download

The Requires

 

battle starcraft blizzard wow diablo battle.net battlenet