1.0.15 • Published 5 years ago

blizzhub v1.0.15

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago