Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blizzard-api/client

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blizzard-api/client

A node.js axios client to integrate with the blizzard battle.net api.

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-87.14%
Maintainers
1
Weekly downloads
 
Created
Source

@blizzard-api/client

This package provides a client that is meant to be used together with one or more of the packages dedicated to a blizzard game.

Currently available packages are:

  • @blizzard-api/wow

Planned packages are:

  • @blizzard-api/d3
  • @blizzard-api/hs
  • @blizzard-api/owl
  • @blizzard-api/sc2
  • @blizzard-api/wow-classic

Installation

npm i @blizzard-api/client

Usage

import { BlizzardApiClient } from '@blizzard-api/client';
import { wow } from '@blizzard-api/wow';

const client = new BlizzardApiClient({
  key: 'environment.blizzardClientId',
  secret: 'environment.blizzardClientSecret',
  origin: 'eu',
});

//For now, you will need to authenticate and set the token like so, but this will be changed in a future update to be handled implicitly in the client
const access = await client.getAccessToken();
client.setAccessToken(access.data.access_token);

//Response will automatically be typed with the appropriate values
const response = await client.sendRequest(wow.commodities());

console.log(response.data);
                      ^ typeof AuctionHouseCommoditiesResponse

Authentication

Please refer to the battle.net documentation for guides on how to obtain Blizzard API credentials.

Keywords

FAQs

Package last updated on 01 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc