-
-
Notifications
You must be signed in to change notification settings - Fork 29
Setting Up
Ben Weier edited this page Feb 7, 2021
·
2 revisions
All game clients are available via their named export.
-
Diablo 3:
d3
-
Hearthstone:
hs
-
Starcraft 2:
sc2
-
World of Warcraft (Retail):
wow
-
World of Warcraft (Classic):
wow.classic
Instantiate the client of your choice:
With TypeScript & ES modules
import { wow } from 'blizzard.js'
const wowClient = await wow.createInstance({
key: BLIZZARD_CLIENT_ID,
secret: BLIZZARD_CLIENT_SECRET,
origin: 'us', // optional
locale: 'en_US' // optional
token: {} // optional
})
With CommonJS
const blizzard = require('blizzard.js')
const wowClient = await blizzard.wow.createInstance({
key: BLIZZARD_CLIENT_ID,
secret: BLIZZARD_CLIENT_SECRET,
origin: 'us', // optional
locale: 'en_US' // optional
token: {} // optional
});