A Node.JS library for accessing and using the Overwatch League API
NOTE: The Overwatch League API is not officially supported by Blizzard, and is subject to change at any time. The documentation for the API has been developed by the community, and may or may not be complete. Keep this in mind before relying on this for a production app!
Install overwatchleague
With yarn:
$ yarn install overwatchleague
With NPM:
$ npm install overwatchleague --save
Update: Changed
getWeeksMatches()
to include full week instead of 3 days either side. Added new expansion teams.
const OverwatchLeague = require('overwatchleague');
const OWL = new OverwatchLeague();
OWL.findTeamName(4410).then(response => {
console.log(response.data);
});
Output: London Spitfire
new OverwatchLeague({options})
options
(object): All options are optionallocale
(string): The locale for response to be returned inuseChina
(boolean, defaultfalse
): Whether or not to use the Chinese API endpoint.
getLiveMatch()
- Returns live data for the current matchgetMatch(matchid)
- Returns data for a specific matchgetMatches()
- Returns data for all matchesgetWeeksMatches()
- Returns data for all matches for the current weekgetConcludedWeek()
- Returns data for all matches played during the last weekgetUpcomingWeek()
- Returns data for all matches during the upcoming week
getInfo()
- Returns information about the Overwatch LeaguegetSchedule()
- Returns current schedule, including past matchesgetMaps()
- Returns a list of mapsgetNews()
- Returns all news itemsgetNewsPost(postid)
- Returns a specific news itemgetStandings(year, stage)
- Returns the current standings. The year will default to 2019 if one is not provided. You must provide a year if you are providing a stage. Valid stage values are "stage1", "stage2", "stage3" and "stage4".getStreams()
- Returns links to Overwatch League livestreamsgetVideos()
- Returns a list of VODs for past matches
getPlayers(teamid/teamname)
- Returns the players for a specific teamgetPlayerStats(playerid)
- Returns general & hero specific stats for a player
findTeamID(teamname)
- Returns the ID for the team name providedfindTeamName(teamid)
- Returns the name for the team ID providedgetGameDiff(teamid/teamname)
- Returns the game difference for a specific teamgetGameLoss(teamid/teamname)
- Returns the game losses for a specific teamgetGameTie(teamid/teamname)
- Returns the game ties for a specific teamgetGameWin(teamid/teamname)
- Returns the game wins for a specific teamgetRankings()
- Returns the current rankingsgetMatchDraw(teamid/teamname)
- Returns the match draws for a specific teamgetMatchLoss(teamid/teamname)
- Returns the match losses for a specific teamgetMatchWins(teamid/teamname)
- Returns the match wins for a specific teamgetPrimaryColor(teamid/teamname)
- Returns the hex code for a team's primary colorgetSecondaryColor(teamid/teamname)
- Returns the hex code for a team's secondary colorgetTeam(teamid/teamname)
- Returns a specific teamgetTeamIcon(teamid/teamname)
- Returns the URL for a team's icongetTeamLogo(teamid/teamname)
- Returns the URL for a team's logogetTeams()
- Retrieve all teamsgetWinPCT(teamid/teamname)
- Returns the match win percentage for a specific teamnextMatchForTeam(teamid/teamname)
- Retrieve the next match for a specific teamlastMatchForTeam(teamid/teamname)
- Retrieve the last match for a specific team
These are the accepted valued for team ID/team name (not case-sensitive)
-
Teams
- Dallas Fuel
- ID: 4523
- Names: Dallas Fuel/Dallas/Fuel
- Philadelphia Fusion
- ID: 4524
- Names: Philadelphia Fusion/Philadelphia/Fusion
- Houston Outlaws
- ID: 4525
- Names: Houston Outlaws/Houston/Outlaws
- Boston Uprising
- ID: 4402
- Names: Boston Uprising/Boston/Uprising
- New York Excelsior
- ID: 4403
- Name: New York Excelsior/New York/Excelsior/NYXL
- San Francisco Shock
- ID: 4404
- Name: San Francisco Shock/San Francisco/Shock
- Los Angeles Valiant
- ID: 4405
- Name: Los Angeles Valiant/LA Valiant/Valiant
- Los Angeles Gladiators
- ID: 4406
- Name: Los Angeles Gladiators/LA Gladiators/Gladiators
- Florida Mayhem
- ID: 4407
- Name: Florida Mayhem/Florida/Mayhem
- Shanghai Dragons
- ID: 4408
- Name: Shanghai Dragons/Shanghai/Dragons
- Seoul Dynasty
- ID: 4409
- Name: Seoul Dynasty/Seoul/Dynasty
- London Spitfire
- ID: 4410
- Name: London Spitfire/London/Spitfire
- Chengdu Hunters
- ID: 7692
- Name: Chengdu Hunters/Chengdu/Hunters
- Hangzhou Spark
- ID: 7693
- Name: Hangzhou Spark/Hangzhou/Spark
- Paris Eternal
- ID: 7694
- Name: Paris Eternal/Paris/Eternal
- Toronto Defiant
- ID: 7695
- Name: Toronto Defiant/Toronto/Defiant
- Vancouver Titans
- ID: 7696
- Name: Vancouver Titans/Vancouver/Titans
- Washington Justice
- ID: 7697
- Name: Washington Justice/Washington/Justice
- Atlanta Reign
- ID: 7698
- Name: Atlanta Reign/Atlanta/Reign
- Guangzhou Charge
- ID: 7699
- Name: Guangzhou Charge/Guangzhou/Charge
- Dallas Fuel
-
Locales
de_DE
- Germanen_US
- English (United States)en_GB
- English (Great Britain)es_ES
- Spanish (Spain)es_MX
- Spanish (Mexico)fr_FR
- Frenchit_IT
- Italianpt_BR
- Portuguesepl_PL
- Polishru_RU
- Russianko_KR
- Koreanja_JP
- Japanesezh_TW
- Chinese (Taiwan)zh_CH
- Chinese (China)- Instead of using
zh_CH
, I recommend usinguseChina: true
- Instead of using