overwatchleague.js
OverwatchLeague API. Inspired by blizzard.js and OWLeagueLib.
Install
Install overwatchleague.js
With yarn:
$ yarn add overwatchleague.js
With npm:
$ npm install overwatchleague.js --save
Usage
-
require("overwatchleague.js")
within your application:
const OverwatchLeague= require("overwatchleague.js");
let owl = new OverwatchLeague("en_US");
- Call the API method of your choice listed below
owl.getSchedule().then(response => {
console.log(response.data);
});
or the async way (NodeJS v8 and above)
(async () => {
let players = await owl.getPlayers();
console.log(players.data);
})();
Constructor
-
new OverwatchLeague(locale);
- set default locale (default: en_US)
Methods
-
getAppData
- Retrieve current app information -
getSchedule
- Retrieve upcoming matches' schedule -
getLiveStreams
- Retrieve current live streams -
getMatch(id)
- Get match's information -
getMatchStats(mapId, mapNumber)
- Get map information for particular match. Example: where10528
is thematchId
and1
is themapNumber
-
getTeam(id)
- Get team's information -
getTeams
- Get all team's information -
getNews
- Retrieve latest site's news -
getPlaylistVideos(name)
- Retrieve playlist -
getRankings
- Retrieve team rankings (games won, games lost, etc) -
getStandings
- Retrieve team standings (division info, player info, etc) -
getVideos
- Retrieve VODs -
getPlayers
- Get overall players' stats -
getPlayer(id)
- Get player id's information -
getUpcomingLiveMatches
- Get upcoming live matches -
getMaps
- Get all maps in pool