From 28517581ca2423876768015c6a512593e9017e38 Mon Sep 17 00:00:00 2001 From: trentduffy Date: Tue, 21 Jan 2020 20:51:17 -0500 Subject: [PATCH 1/3] add getPlayerStatsByMap --- lib/Games/getPlayerStatsByMap.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/Games/getPlayerStatsByMap.js diff --git a/lib/Games/getPlayerStatsByMap.js b/lib/Games/getPlayerStatsByMap.js new file mode 100644 index 0000000..df0524b --- /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; From 9e31d941ac6f28db52d690589efb7a382926cc30 Mon Sep 17 00:00:00 2001 From: trentduffy Date: Tue, 21 Jan 2020 20:56:02 -0500 Subject: [PATCH 2/3] added a litle more --- index.d.ts | 3 +++ index.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) 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'); From 50d3f8b80fa1e46fc0637de942b9c34dc3e5527f Mon Sep 17 00:00:00 2001 From: trentduffy Date: Tue, 21 Jan 2020 21:18:12 -0500 Subject: [PATCH 3/3] forgot a slash --- lib/Games/getPlayerStatsByMap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Games/getPlayerStatsByMap.js b/lib/Games/getPlayerStatsByMap.js index df0524b..af74dec 100644 --- a/lib/Games/getPlayerStatsByMap.js +++ b/lib/Games/getPlayerStatsByMap.js @@ -1,5 +1,5 @@ var getPlayerStatsByMap = function(matchId, mapNumber){ - return this.api.get(`/stats/matches${matchId}/maps/${mapNumber}`); + return this.api.get(`/stats/matches/${matchId}/maps/${mapNumber}`); } module.exports = getPlayerStatsByMap;