jleagle/battlenet-api-client

A package to retrieve information from the Battle.net API

0.1.0 2015-11-27 23:55 UTC

This package is auto-updated.

Last update: 2024-11-09 14:06:24 UTC


README

Build Status (Scrutinizer) Code Quality (scrutinizer) Latest Stable Version Latest Unstable Version

A package to retrieve information from the Battle.net API (https://dev.battle.net/)

Pros
  • 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

Usage

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);