Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

blizzhub

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blizzhub

A typescript library implemention of blizzard API

latest
Source
npmnpm
Version
1.0.15
Version published
Maintainers
1
Created
Source

blizzhub-ts

A typescript library with the implementation of the new blizzard API This library is inteded to be used with a know-how of restful API's and some experience of blizzard games at all.

How to install?

npm i blizzhub

How to use?

First you have to create an Application or have an existing one at the new battle.net portal in order to retrieve the client_id and client_secret (this is basically how OAuth works). To initialize our api we simply do:

import { API, IBearerToken } from 'blizzhub/lib/api'
import {Wow} from 'blizzhub/lib'
import {Diablo3} from 'blizzhub/lib'
const api = new API('client_id', 'client_secret', (status, token) => {
    //Here inside you do whatever you want with the token like this
    const const conRealms = new Wow.ConnectedRealm();
    conRealms.getConnectedRealmIndex('us', 'dynamic-us', 'en_US')
    .then( data )
    .catch( ex => {} )
})

Now there are alot of options for Wow or Diablo3, you can even import them directly by doing

import {Diablo3} from 'blizzhub/lib'
Diablo3.Era,Act,etc..

This library is up-to-date with battle.net dev portal, i'll keep updating this after they release Starcraft2 API.

If you find any bug or something not working well, please simply report it and i'll fix

Keywords

blizzard,battle.net,API,diablo3,wow

FAQs

Package last updated on 06 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts