From 329bc2e5cf2592488c51f8717d85064a45cb0ff7 Mon Sep 17 00:00:00 2001 From: Mike Kreiser Date: Sun, 22 Oct 2023 18:27:47 -0400 Subject: [PATCH 1/2] Add projected points to Boxscore for the current matchup period --- src/boxscore/boxscore.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/boxscore/boxscore.js b/src/boxscore/boxscore.js index 5b0f0e6..ecaef10 100644 --- a/src/boxscore/boxscore.js +++ b/src/boxscore/boxscore.js @@ -16,11 +16,15 @@ class Boxscore extends BaseObject { * @typedef {object} BoxscoreMap * * @property {number} homeScore The total points scored by the home team. + * @property {number} homeProjectedScore The projected total points scored by the home team. + * NOTE: This field is only populated in the boxscore for the current matchup period! * @property {number} homeTeamId The home team's id. Can be used to load a cached Team. * @property {BoxscorePlayer[]} homeRoster The home team's roster, containing player info and * stats. * * @property {number} awayScore The total points scored by the away team. + * @property {number} awayProjectedScore The projected total points scored by the away team. + * NOTE: This field is only populated in the boxscore for the current matchup period! * @property {number} awayTeamId The away team's id. Can be used to load a cached Team. * @property {BoxscorePlayer[]} awayRoster The away team's roster, containing player info and * stats. @@ -36,6 +40,7 @@ class Boxscore extends BaseObject { _.get(responseData, 'totalPointsLive') || _.get(responseData, 'totalPoints') ) }, + homeProjectedScore: 'home.totalProjectedPointsLive', homeTeamId: 'home.teamId', homeRoster: { key: 'home.rosterForCurrentScoringPeriod.entries', @@ -52,6 +57,7 @@ class Boxscore extends BaseObject { _.get(responseData, 'totalPointsLive') || _.get(responseData, 'totalPoints') ) }, + awayProjectedScore: 'away.totalProjectedPointsLive', awayTeamId: 'away.teamId', awayRoster: { key: 'away.rosterForCurrentScoringPeriod.entries', From d9c6602933057306267a0f73a023f2c029083964 Mon Sep 17 00:00:00 2001 From: Mike Kreiser Date: Sun, 22 Oct 2023 18:29:56 -0400 Subject: [PATCH 2/2] 1.6.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fac319e..3107a85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "espn-fantasy-football-api", - "version": "1.5.0", + "version": "1.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "espn-fantasy-football-api", - "version": "1.5.0", + "version": "1.6.0", "license": "LGPL-3.0-only", "dependencies": { "axios": "^1.5.0", diff --git a/package.json b/package.json index d252cf8..c1be1e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espn-fantasy-football-api", - "version": "1.5.0", + "version": "1.6.0", "description": "A Javascript API to connect to ESPN's fantasy football API", "main": "web.js", "files": [