PHPackages                             boo/bnet - 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. boo/bnet

ActiveLibrary[API Development](/categories/api)

boo/bnet
========

Library for working with the Battle.net Web APIs.

0.1.1(9y ago)3015410[2 issues](https://github.com/jyggen/bnet/issues)MITPHPPHP &gt;=5.5CI failing

Since Jul 4Pushed 6y ago10 watchersCompare

[ Source](https://github.com/jyggen/bnet)[ Packagist](https://packagist.org/packages/boo/bnet)[ Docs](https://github.com/pwnraid/bnet)[ RSS](/packages/boo-bnet/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (10)Versions (4)Used By (0)

Battle.net API Client
=====================

[](#battlenet-api-client)

[![Source Code](https://camo.githubusercontent.com/d07324351322b6d139e06f109d196f5cb6a1796c73ff78be97aecce971583a45/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d626f6f2f626e65742d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/jyggen/bnet)[![Latest Version](https://camo.githubusercontent.com/7f694d065469ac7ffd28e5a728cdf5fae042732fd40172a3c59fb23a60091eae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626f6f2f626e65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/boo/bnet)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/jyggen/bnet/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/b9f7f3f2339e4f6ec34a6cedb2173cdfb462df7ad1fe4e79ab6ff9b46810cdcc/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a796767656e2f626e65742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/jyggen/bnet)[![Coverage Status](https://camo.githubusercontent.com/bb9d8d517847acbeb5314a978017bee6b265a82bd40c75d81d328a689952c8ef/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6a796767656e2f626e65742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/jyggen/bnet?branch=master)[![Total Downloads](https://camo.githubusercontent.com/e2063ba82df7e0c368f339f5aff24a82a962a221df1f33412f9590dee3f4ba7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626f6f2f626e65742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/boo/bnet)

boo/bnet is a PHP 7.1+ library for working with the Battle.net APIs.

Installation
------------

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/boo/bnet) and [Composer](http://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require boo/bnet
```

Usage
-----

[](#usage)

### API

[](#api)

The boo/bnet library is able to generate [PSR-7](https://www.php-fig.org/psr/psr-7/) requests for all Battle.net API endpoints. In order to do so, a request factory implementing [PSR-17](https://www.php-fig.org/psr/psr-17/), as well as a [PSR-7](https://www.php-fig.org/psr/psr-7/) compatible HTTP client, is required. The example below uses [http-interop/http-factory-guzzle](https://packagist.org/packages/http-interop/http-factory-guzzle) and [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle), but any [PSR-17](https://www.php-fig.org/psr/psr-17/) implementation and [PSR-7](https://www.php-fig.org/psr/psr-7/) compatible HTTP client will work.

```
use Boo\BattleNet\Apis\Warcraft\CharacterProfileApi;
use Boo\BattleNet\Regions\EU;
use GuzzleHttp\Client;
use Http\Factory\Guzzle\RequestFactory;

$api = new CharacterProfileApi(
    new RequestFactory(), // Implementation of PSR-17
    new EU(), // API region
    '3797fb20f11da97fbc5fc9335247883c' // API key
);

$request = $api->getCharacterProfile('Draenor', 'Jyggen');
$client = new Client(); // PSR-7 compatible HTTP client
$response = $client->send($request);

var_dump($response);
```

### OAuth 2.0

[](#oauth-20)

The boo/bnet library ships with a provider for [league/oauth2-client](https://packagist.org/packages/league/oauth2-client).

```
use Boo\BattleNet\OAuth2\BattleNetProvider;

$provider = new BattleNetProvider([
    'clientId' => '3797fb20f11da97fbc5fc9335247883c',
    'clientSecret' => '7daf46a2c8a780582c6e46e71e5158fd',
    'redirectUri' => 'https://localhost/oauth',
    'region' => new EU(),
]);
```

Copyright and License
---------------------

[](#copyright-and-license)

The boo/bnet library is copyright © [Jonas Stendahl](https://stendahl.me/) and licensed for use under the MIT License (MIT). Please see [LICENSE](https://github.com/jyggen/bnet/blob/master/LICENSE) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93% 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 ~1 days

Total

2

Last Release

3648d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/264300?v=4)[Jonas Stendahl](/maintainers/jyggen)[@jyggen](https://github.com/jyggen)

---

Top Contributors

[![jyggen](https://avatars.githubusercontent.com/u/264300?v=4)](https://github.com/jyggen "jyggen (212 commits)")[![morloderex](https://avatars.githubusercontent.com/u/5677808?v=4)](https://github.com/morloderex "morloderex (10 commits)")[![tehmufifnman](https://avatars.githubusercontent.com/u/436828?v=4)](https://github.com/tehmufifnman "tehmufifnman (3 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (1 commits)")[![sasin91](https://avatars.githubusercontent.com/u/808722?v=4)](https://github.com/sasin91 "sasin91 (1 commits)")[![sk9](https://avatars.githubusercontent.com/u/2162231?v=4)](https://github.com/sk9 "sk9 (1 commits)")

---

Tags

apidiablobattle.netblizzardwarcraftstarcraftbnet

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/boo-bnet/health.svg)

```
[![Health](https://phpackages.com/badges/boo-bnet/health.svg)](https://phpackages.com/packages/boo-bnet)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k13](/packages/tempest-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M723](/packages/sylius-sylius)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k39](/packages/civicrm-civicrm-core)[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.7M18](/packages/xeroapi-xero-php-oauth2)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M545](/packages/shopware-core)

PHPackages © 2026

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