3.0.2 • Published 7 years ago
overwatch-stats v3.0.2
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