Closed albertoronu closed 1 year ago
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch mlb-stats-api@1.6.0 for the project I'm working on.
mlb-stats-api@1.6.0
Here is the diff that solved my problem:
diff --git a/node_modules/mlb-stats-api/src/resources/game.js b/node_modules/mlb-stats-api/src/resources/game.js index 888d9ab..8c48e8e 100644 --- a/node_modules/mlb-stats-api/src/resources/game.js +++ b/node_modules/mlb-stats-api/src/resources/game.js @@ -7,6 +7,12 @@ class Game { return this.request.get(`${this.apiHost}game/${gamePk}`, { params: params }); } + getGameFeedLive(args = { pathParams: '' }) { + // if empty object but no pathParams return error, or handle it + const { params, pathParams: { gamePk = '', timecode = '' } } = args; + return this.request.get(`${this.apiHost}game/${gamePk}/feed/live?timecode=${timecode}`, { params: params }); + } + getGameDiffPatch(args = { pathParams: '' }) { const { params, pathParams: { gamePk = ''}} = args; return this.request.get(`${this.apiHost}game/${gamePk}/feed/live/diffPatch`, { params: params });
This issue body was partially generated by patch-package.
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
mlb-stats-api@1.6.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.