Skip to content

ShaunLWM/OverwatchLeague.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

overwatchleague.js

npm downloads "Latest Release" MIT license

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

  1. require("overwatchleague.js") within your application:
const OverwatchLeague= require("overwatchleague.js");
let owl = new OverwatchLeague("en_US");
  1. 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: where 10528 is the matchId and 1 is the mapNumber
  • 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