diff --git a/index.d.ts b/index.d.ts index 09039dc..5959713 100644 --- a/index.d.ts +++ b/index.d.ts @@ -65,6 +65,9 @@ declare module "overwatchleague" { */ getUpcomingWeek(): AxiosPromise; + + getPlayerStatsByMap(matchId: number, mapNumber: number): AxiosPromise; + /* * SECTION: General Methods */ diff --git a/index.js b/index.js index 81bb9f7..82fa8a0 100644 --- a/index.js +++ b/index.js @@ -56,7 +56,7 @@ class owl { baseURL: url, params: params }); - + this.locale = locale; } } @@ -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'); diff --git a/lib/Games/getPlayerStatsByMap.js b/lib/Games/getPlayerStatsByMap.js new file mode 100644 index 0000000..af74dec --- /dev/null +++ b/lib/Games/getPlayerStatsByMap.js @@ -0,0 +1,5 @@ +var getPlayerStatsByMap = function(matchId, mapNumber){ + return this.api.get(`/stats/matches/${matchId}/maps/${mapNumber}`); +} + +module.exports = getPlayerStatsByMap;