Skip to main content

Built and signed on GitHub Actions

TS library to interact with the Blizzard Battle.net API. World of Warcraft, World of Warcraft Classic, StarCraft 2, Diablo 3, Hearthstone, Overwatch League.

This package works with Bun, Node.js, DenoIt is unknown whether this package works with Cloudflare Workers
JSR Score
88%
Published
2 months ago (0.3.3)

BLIZZARD_API

JSR Version

Start of what will cover the whole Blizzard Battle.net API when its done.

Link to the module on JSR

WORK IN PROGRESS

Let me know if you want certain APIs to be prioritized. Currently only supports client credentials flow but the plan is to implement authorization code flow also.

APIs implemented

APIs Status Note
World of Warcraft: Game Data APIs
World of Warcraft: Profile APIs
World of Warcraft Classic: Game Data APIs
Diablo III: Community APIs
Diablo III: Game Data APIs
Hearthstone: Game Data APIs
Overwatch League: Community APIs Only seem to support US region and some data types are partially defined as Unknown
StarCraft II: Community APIs
StarCraft II: Game Data APIs

Example

import * as blizzardAPI from "@pinta365/blizzard-api";

const clientId = "<YOUR CLIENT ID>";
const clientSecret = "<YOUR SECRET>";

blizzardAPI.setup({
    clientId,
    clientSecret,
    region: "eu",
    locale: "en_GB",
});

try {
    const sword = await blizzardAPI.wow.item(33791);
    console.log(sword);
} catch (error) {
    console.log(error);
}

Issues

Issues or questions concerning the library can be raised at the github repository page.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Built and signed on
GitHub Actions
View transparency log

Add Package

deno add @pinta365/blizzard-api

Import symbol

import * as mod from "@pinta365/blizzard-api";

Add Package

npx jsr add @pinta365/blizzard-api

Import symbol

import * as mod from "@pinta365/blizzard-api";

Add Package

yarn dlx jsr add @pinta365/blizzard-api

Import symbol

import * as mod from "@pinta365/blizzard-api";

Add Package

pnpm dlx jsr add @pinta365/blizzard-api

Import symbol

import * as mod from "@pinta365/blizzard-api";

Add Package

bunx jsr add @pinta365/blizzard-api

Import symbol

import * as mod from "@pinta365/blizzard-api";