Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.62 KB

README.md

File metadata and controls

48 lines (30 loc) · 1.62 KB

Blizzard.js

Travis Codecov Greenkeeper badge Gitter

Blizzard.js is a promise-based Node.js library for the Blizzard Community Platform API.

Install

Install blizzard.js and save to your package.json dependencies in one easy step:

With yarn:

$ yarn add blizzard.js

With npm:

$ npm install blizzard.js --save

Usage

Step 1: require() and initialize() Blizzard.js within your application:

const blizzard = require('blizzard.js').initialize({ apikey: BLIZZARD_API_KEY });

Step 2: Call the API methods to request data:

blizzard.wow.character(['profile'], { origin: 'us', realm: 'amanthul', name: 'charni' })
  .then(response => {
    console.log(response.data);
  });

Step 3: ???

Step 4: Profit.

Battle.net API Key

Your private Blizzard API key must be passed to .initialize(). Please see the documentation at the Blizzard Developer Portal to obtain your own Blizzard API key.