PHPackages                             johnleider/battlenet-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. johnleider/battlenet-api

ActiveLibrary[API Development](/categories/api)

johnleider/battlenet-api
========================

A package to retrieve information from Blizzard's API

v2(10y ago)5981MITPHPPHP &gt;=7.0

Since Jul 11Pushed 10y ago2 watchersCompare

[ Source](https://github.com/johnleider/battlenet-api)[ Packagist](https://packagist.org/packages/johnleider/battlenet-api)[ RSS](/packages/johnleider-battlenet-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

battlenet-api
=============

[](#battlenet-api)

A package for Battle.net's API ()

### Usage

[](#usage)

Instantiate the game API you wish to use with your API Key, API Secret and Region

```
$diablo = new Diablo(
  $key,
  $secret,
  'us',
  'en_US'
);
```

Example API calls:

```
// Retrieve Season Leaderboard data
$diablo = new Diablo($key, $secret, 'us', 'en_US');
$diablo->setAccessToken($accessToken);

$barbarian = $diablo->season($season)
	->barbarian()
	->get();

$barbarian_hardcore = $diablo->season($season)
	->hardcore()
	->barbarian()
	->get();

$profile = $diablo->careerProfile('battle_tag');
$hero = $diablo->hero('battle_tag', 'id');
```

### Pooling Requests

[](#pooling-requests)

You can pool multiple requests by chaining requests before calling get().

```
$diablo = new Diablo($key, $secret, 'us', 'en_US');
$diablo->setAccessToken($accessToken);

$leaderboards = $diablo->season($season)
	->barbarian()
	->crusader()
	->demonhunter()
	->monk()
	->witchdoctor()
	->wizard()
	->team(2)
	->team(3)
	->team(4)
	->get();

$profile = $diablo->setRegion('eu')
	->careerProfile($battle_tag)
	->get();

foreach ($request->heroes as $hero) {
	$diablo->hero($hero->id);
}

$heroes = $diablo->get();

```

This will asynchronously request 25 concurrent requests at a time. The response will return as an array of JSON objects. The call will not be made until the get method is called.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~47 days

Total

5

Last Release

3777d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fba06cbb087d92f219d9fc6605c10bee020a7328ccfe11085d9bcef44dd9b049?d=identicon)[johnleider](/maintainers/johnleider)

---

Top Contributors

[![johnleider](https://avatars.githubusercontent.com/u/9064066?v=4)](https://github.com/johnleider "johnleider (46 commits)")

---

Tags

wowdiablobattle.netbattleblizzardwarcraftstarcraft

### Embed Badge

![Health badge](/badges/johnleider-battlenet-api/health.svg)

```
[![Health](https://phpackages.com/badges/johnleider-battlenet-api/health.svg)](https://phpackages.com/packages/johnleider-battlenet-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[logansua/blizzard-api-client

API client for blizzard API written in PHP

302.5k](/packages/logansua-blizzard-api-client)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
