Skip to content
Flexible and feature-rich Node.js library for easy access to StarCraft II Community and Game Data APIs
TypeScript JavaScript
Branch: master
Clone or download
lwojcik Greenkeeper/prettier 1.19.1 (#78)
* chore(package): update prettier to version 1.19.1

Closes #73

* chore(package): update lockfile package-lock.json
Latest commit c422dc5 Nov 12, 2019

README.md

StarCraft2-API logo

StarCraft2-API

Travis CI Build Status AppVeyor Build Status Maintainability Test Coverage Greenkeeper badge

Feature-rich library for easy access to StarCraft II Community APIs and StarCraft II Game Data APIs powered by BlizzAPI.

Install

npm install starcraft2-api

Quick start

const StarCraft2API = require('starcraft2-api');

const sc2api = new StarCraft2API({
  region: 'us',
  clientId: 'client id',
  clientSecret: 'client secret'
});

const data = await sc2api.queryProfile({ regionId: 1, realmId: 1, profileId: 1084304 });

console.log(data);

Manual build

git clone https://github.com/lukemnet/starcraft2-api.git
cd starcraft2-api
npm install
npm run build

Available methods

Method Description
queryStaticProfileData Returns all static SC2 profile data (achievements, categories, criteria, and rewards).
queryProfileMetadata Returns metadata for an individual's profile.
queryProfile Returns data about an individual SC2 profile.
queryLadderSummary Returns a ladder summary for an individual SC2 profile.
queryPlayerLadder Returns data about an individual profile's ladder.
queryGrandmasterLeaderboard Returns ladder data for the current season's grandmaster leaderboard.
querySeason Returns data about the current season.
queryPlayerAccount Returns metadata for an individual's account.
queryLegacyProfile Retrieves data about an individual SC2 profile.
queryLegacyLadders Retrieves data about an individual SC2 profile's ladders.
queryLegacyMatchHistory Returns data about an individual SC2 profile's match history.
queryLegacyLadder Returns data about an individual SC2 ladder.
queryLegacyAchievements Returns data about the achievements available in SC2.
queryLegacyRewards Returns data about the rewards available in SC2.
queryLeagueData Returns data for the specified season, queue, team, and league.

Documentation & examples

License

Licensed under MIT License. See LICENSE for more information.

Legal

This project is not authored, affiliated or endorsed in any way by Blizzard Entertainment.

Battle.net and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.

© 2010 Blizzard Entertainment, Inc. All rights reserved. Wings of Liberty is a trademark, and StarCraft and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.

© 2013 Blizzard Entertainment, Inc. All rights reserved. Heart of the Swarm and StarCraft are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.

You can’t perform that action at this time.