Need private packages and team management tools?Check out npm Teams »

This package has been deprecated

Author message:

this package has been deprecated

overwatch-stats

3.0.2 • Public • Published

Overwatch Stats v3

Overwatch Stats Reporting API

Built by Jack Baron

Usage

In order to cut down on rate limiting, v3 has a caching system of sorts. This means you need to load data and then pass it to the OWStats class as a paramter. This can be done by doing:

const OWStats = require('overwatch-stats')
OWStats.load('lolPants#2204')
  .then(data => {
    let stats = new OWStats(data)
    // Stats Object available for use
  })

Methods

All methods return as Promises. This is for easy chaining.


.getRegions()

Returns an array of available regions for the user.

.getActiveRegion()

Returns a string of the user's most active region.
Determined by the highest player level.

.getData(region)

Region parameter is optional.
If not specified, defaults to most active region.

Returns an object with all the data you could ever want. Try it!

Credits

  • OWAPI: Their wonderful API
  • VisionMedia: Superagent Library

Install

npm i overwatch-stats

DownloadsWeekly Downloads

185

Version

3.0.2

License

ISC

Last publish

Collaborators

  • avatar