JavaScripting

The definitive source of the best
JavaScript libraries, frameworks, and plugins.


  • ×

    Blizzard.js

    A promise-based Node.JS library for the Blizzard Battle.net Community Platform API
    Filed under  › 

    • 🔾24%Overall
    • 103
    • 5.7 days
    • 🕩23
    • 👥7

    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 npm:

    $ npm install blizzard.js --save
    

    With yarn:

    $ yarn add blizzard.js
    

    Usage

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

    const blizzard = require('blizzard.js').initialize({
      key: BLIZZARD_CLIENT_ID,
      secret: BLIZZARD_CLIENT_SECRET,
    });
    

    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 Client ID and Secret must be passed to .initialize(). Please see the documentation at the Blizzard Developer Portal to obtain your own Blizzard API credentials.

    Show All