A package to retrieve information from the Battle.net API (https://dev.battle.net/)
- Code hinting
- Contains all game APIs (Diablo 3, StarCraft 2 and WoW)
- Contains authed account and community APIs, with helper functions to get OAuth tokens
Instantiate the package using your games class, passing though your API key, ServerLocation and ResponseLocale:
$warcraft = new Warcraft(
$key,
ServerLocations::EU,
ResponseLocales::EN_GB
);
Example API calls:
// Retrieve auction data
$auctions = $warcraft->getAuctions('outland');
// Retrieve realm list
$realms = $warcraft->getRealms();
// Retrieve achievement details
$achievement = $warcraft->getAchievement(2144);