npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pinta365/blizzard_api

v0.8.8

Published

TS library to interact with the Blizzard Battle.net API. World of Warcraft (Retail, Classic and WoW: Forever), StarCraft 2, Diablo 3, Hearthstone.

Readme

BLIZZARD API

JSR Version

TypeScript client for the Blizzard Battle.net APIs: World of Warcraft (Retail, Classic, Classic Era and WoW: Forever), Hearthstone, StarCraft II and Diablo III. Runs on Deno, Node.js, Bun and in the browser, and every response has a type.

Documentation: https://blizzard.pinta.land: guide, WoW: Forever notes and a reference of every endpoint.

Installation

# Deno
deno add jsr:@pinta365/blizzard-api

# Bun
bunx jsr add @pinta365/blizzard-api

# Node.js
npx jsr add @pinta365/blizzard-api

# NPM (CommonJS)
npm install @pinta365/blizzard_api --save

Usage

Create an API client at https://develop.battle.net/access/clients to get a client ID and secret.

import { createClient } from "@pinta365/blizzard-api";

const client = createClient({
    region: "eu", // "us" | "eu" | "kr" | "tw" | "cn"
    clientId: "<YOUR CLIENT ID>",
    clientSecret: "<YOUR SECRET>",
});

const sword = await client.wow.item(33791);
const realms = await client.wowClassicEra.realms();
const profile = await client.wowForever.characterProfile("Anduin", "Wrynn");
const card = await client.hearthstone.fetchCard("52119-arch-villain-rafaam");

The client fetches and renews the access token for you. See the guide for regions and locales, response types, user tokens (account profile endpoints), errors and retries, and upgrading from earlier versions.

APIs

| Client property | API | | ---------------------- | ---------------------------------------------------------------- | | client.wow | World of Warcraft (Retail): game data and profile | | client.wowClassic | WoW Classic progression (currently Mists of Pandaria Classic) | | client.wowClassicEra | WoW Classic Era, Season of Discovery, Hardcore, Anniversary | | client.wowForever | WoW: Forever (undocumented by Blizzard; see the Forever notes) | | client.hearthstone | Hearthstone game data | | client.sc2 | StarCraft II game data and community, including legacy endpoints | | client.diablo3 | Diablo III game data and community |

Every endpoint is checked against the live API by the project's smoke test, and weekly in CI.

Development

deno task test        # offline unit tests
deno task smoke       # live smoke test of every endpoint (needs .env with BLIZZARD_CLIENT_ID / BLIZZARD_CLIENT_SECRET)
deno task gen:api     # regenerate src/generated/ after adding or changing endpoints
deno task user-token --save # log in with Battle.net and save a user token to .env (for the account endpoints)
deno task check:types # check the response types against the responses saved by the smoke test (fixtures/)
deno task check:fields # list fields the API returns that the response types don't declare
deno task docs:gen    # generate the docs site's endpoint reference (docs/), built with tryck

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.