Warning! This fork is already deprecated. If you are looking for a library to access Blizzard Battle.net API, try Lukem's BlizzAPI
A promised-based Node.js wrapper for the Battle.net Community and Data APIs (supports WoW, WoW Classic, SC2, D3, and Hearthstone).
$ npm install --save "git+https://github.com/AlexZeDim/battlenet-api-wrapper.git"
- To get your
Client IDandClient Secretneeded for this library, please refer to the steps in the Battle.net API Getting Started documentation. - Battle.net API Documentation Reference: https://develop.battle.net/documentation
The basic implementation of this library is as follows:
const battleNetWrapper = require('battlenet-api-wrapper');
const clientId = 'YOUR_CLIENT_ID';
const clientSecret = 'YOUR_CLIENT_SECRET';
const providedToken = '';
const region = 'eu';
const locale = 'en_GB';
(async function() {
const bnw = new battleNetWrapper();
await bnw.init(clientId, clientSecret, providedToken, region, locale);
/* make request here with bnw.className.methodName(..args) */
}());
Once you have the battleNetWrapper class object instantiated, you then have access to all of the classes
that exist under that umbrella. For each of the classes below, you will see a link to the full abstraction
documentation. Each of functions are available on the respective class objects.
bnw.Diablo3CommunityUsage Documentationbnw.Diablo3GameDataUsage Documentationbnw.HearthstoneGameDataUsage Documentationbnw.Starcraft2CommunityUsage Documentationbnw.Starcraft2GameDataUsage Documentationbnw.WowGameDataUsage Documentationbnw.WowProfileDataUsage Documentationbnw.WowClassicGameDataUsage Documentationbnw.WowCommunityUsage Documentation
WoWCommunity endpoints has been deprecated since 16 March 2020 and no longer working. (See this thread)
Create a PR or post an issue in this fork (reviewed by me)
Or make PR, post an issue at the origin source (reviewed by QuadDamn)
The original library has been made by QuadDamn
Battle.net API Wrapper is released under the MIT License.