Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

add getPlayerStatsByMap #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ declare module "overwatchleague" {
*/
getUpcomingWeek(): AxiosPromise;


getPlayerStatsByMap(matchId: number, mapNumber: number): AxiosPromise;

/*
* SECTION: General Methods
*/
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class owl {
baseURL: url,
params: params
});

this.locale = locale;
}
}
Expand All @@ -75,6 +75,7 @@ owl.prototype.getMatches = require('./lib/Games/getMatches');
owl.prototype.getWeeksMatches = require('./lib/Games/getWeeksMatches');
owl.prototype.getConcludedWeek = require('./lib/Games/getConcludedWeek');
owl.prototype.getUpcomingWeek = require('./lib/Games/getUpcomingWeek');
owl.prototype.getPlayerStatsByMap = require('./lib/Games/getPlayerStatsByMap');

// import gemeral methods
owl.prototype.getInfo = require('./lib/General/getInfo');
Expand Down
5 changes: 5 additions & 0 deletions lib/Games/getPlayerStatsByMap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var getPlayerStatsByMap = function(matchId, mapNumber){
return this.api.get(`/stats/matches/${matchId}/maps/${mapNumber}`);
}

module.exports = getPlayerStatsByMap;