@kruhlmann/battlenetjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

BattleNet.js

WIP battlenet node.js api.

Usage

import { BattleNetClient, BattleNetOauthService } from "battlenetjs";

async function main(): Promise<void> {
    const service = new BattleNetOauthService("client_id", "client_secret");
    const namespace = new BattleNetNamespace(
        BattleNetBaseNamespace.WOW_CLASSIC_PROGRESSION,
        BattleNetRegion.NORTH_AMERICA,
    );
    const client = new BattleNetClient(service, namespace);
    const item = await client.get_item_by_id(19_019);
    console.log(item.name);
    const item2 = await client.get_item_by_name("Thunderfury");
    console.log(item2.name);
}
Thunderfury, Blessed Blade of the Windseeker
Thunderfury, Blessed Blade of the Windseeker

Readme

Keywords

none

Package Sidebar

Install

npm i @kruhlmann/battlenetjs

Weekly Downloads

0

Version

1.0.12

License

none

Unpacked Size

119 kB

Total Files

238

Last publish

Collaborators

  • kruhlmann