From 1cbc9ce37b1f2e59acc04b9afec5507e0bccbe9c Mon Sep 17 00:00:00 2001 From: matteolel Date: Thu, 5 Dec 2019 23:34:33 +0100 Subject: [PATCH 1/4] Add allTimePlayers and allTimeTeams Added allTimePlayers and allTimeTeams functions to retrieve dynamic data parsed from https://stats.nba.com/js/data/ptsd/stats_ptsd.js --- src/all-time.js | 39 +++++++++++++++++++++++++++++++++++++++ src/index.js | 6 ++++++ src/util/https-request.js | 28 ++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 src/all-time.js create mode 100644 src/util/https-request.js diff --git a/src/all-time.js b/src/all-time.js new file mode 100644 index 0000000..379443d --- /dev/null +++ b/src/all-time.js @@ -0,0 +1,39 @@ +const httpsRequest = require('./util/https-request'); + +function allTimePlayers() { + return httpsRequest().then(function (body) { + return JSON.parse(body.match(/{.*}/g)[0]).data.players.map(val => { + var nameArr = val[1].split(','); + var newNames = {}; + if (nameArr.length == 1) { + // for example "Nene" hasn't fave a lastName + newNames = { "firstName": nameArr[0], "lastName": "" }; + } else { + // note that there could be more that one commas (e.g. "Hoffman, Bear, The Body") + newNames = { "firstName": val[1].substring(nameArr[0].length + 2).trim(), "lastName": nameArr[0].trim() }; + } + return { + "playerId": val[0], + "fullName": val[1], + "activeBetween": [val[3], val[4]], + ...newNames, + } + }); + }); +} + +function allTimeTeams() { + return httpsRequest().then(function (body) { + return JSON.parse(body.match(/{.*}/g)[0]).data.teams.map(val => { + return { + "teamId": val[0], + "abbreviation": val[1], + "simpleName": val[4], + "location": val[3], + "teamName": val[3] + ' ' + val[4], + } + }); + }); +} + +module.exports = { allTimePlayers, allTimeTeams }; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 87ca874..e899ec0 100644 --- a/src/index.js +++ b/src/index.js @@ -10,6 +10,8 @@ const buildPlayers = require("./util/build-players"); const players = buildPlayers(require("../data/players.json")); +const { allTimePlayers, allTimeTeams } = require('./all-time') + const nba = { // namespaces for NBA API endpoints stats, @@ -30,6 +32,10 @@ const nba = { // update in-memory data updatePlayers, updateTeams, + + // dynamic data parsed from https://stats.nba.com/js/data/ptsd/stats_ptsd.js + allTimePlayers, + allTimeTeams, }; function teamIdFromName (name) { diff --git a/src/util/https-request.js b/src/util/https-request.js new file mode 100644 index 0000000..621264e --- /dev/null +++ b/src/util/https-request.js @@ -0,0 +1,28 @@ +const https = require('https'); + +function httpsRequest() { + return new Promise(function (resolve, reject) { + var req = https.get('https://stats.nba.com/js/data/ptsd/stats_ptsd.js', (resp) => { + var data = ''; + + resp.on('data', (chunk) => { + data += chunk; + }); + + resp.on('end', () => { + resolve(data); + }); + + }); + + // reject on request error + req.on('error', function (err) { + reject(err); + }); + + // IMPORTANT + req.end(); + }); +} + +module.exports = httpsRequest; From dc389265503476e8a0bf69f0d8d7f317980a3284 Mon Sep 17 00:00:00 2001 From: matteolel Date: Fri, 6 Dec 2019 22:01:49 +0100 Subject: [PATCH 2/4] Create index.d.ts Add auto-generated types file --- index.d.ts | 1178 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1178 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..fecc342 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,1178 @@ +/** Declaration file generated by dts-gen */ + +export const players: { + downcaseName: string; + firstName: string; + fullName: string; + lastName: string; + playerId: number; + teamId: number; +}[]; + +export const teams: { + abbreviation: string; + location: string; + simpleName: string; + teamId: number; + teamName: string; +}[]; + +export function allTimePlayers(): any; + +export function allTimeTeams(): any; + +export function findPlayer(str: any): any; + +export function playerIdFromName(name: any): any; + +export function searchPlayers(str: any): any; + +export function teamIdFromName(name: any): any; + +export function updatePlayers(): any; + +export function updateTeams(): any; + +export namespace data { + function boxScore(date: any, gameId: any): void; + + function coaches(season: any): void; + + function leadTracker(date: any, gameId: any, period: any): void; + + function playByPlay(date: any, gameId: any): void; + + function playoffsBracket(season: any): void; + + function previewArticle(date: any, gameId: any): void; + + function recapArticle(date: any, gameId: any): void; + + function schedule(season: any): void; + + function scoreboard(date: any): void; + + function teamLeaders(season: any, teamId: any): void; + + function teamSchedule(season: any, teamId: any): void; + + function teamStatsRankings(season: any): void; + + function withTransport(newTransport: any): void; + + namespace boxScore { + const defaults: { + date: any; + gameId: any; + }; + + } + + namespace coaches { + const defaults: { + season: any; + }; + + } + + namespace leadTracker { + const defaults: { + date: any; + gameId: any; + period: any; + }; + + } + + namespace playByPlay { + const defaults: { + date: any; + gameId: any; + }; + + } + + namespace playoffsBracket { + const defaults: { + season: any; + }; + + } + + namespace previewArticle { + const defaults: { + date: any; + gameId: any; + }; + + } + + namespace recapArticle { + const defaults: { + date: any; + gameId: any; + }; + + } + + namespace schedule { + const defaults: { + season: any; + }; + + } + + namespace scoreboard { + const defaults: { + date: any; + }; + + } + + namespace teamLeaders { + const defaults: { + season: any; + teamId: any; + }; + + } + + namespace teamSchedule { + const defaults: { + season: any; + teamId: any; + }; + + } + + namespace teamStatsRankings { + const defaults: { + season: any; + }; + + } + +} + +export namespace sportVu { + function catchShoot(): any; + + function defense(): any; + + function drives(): any; + + function passing(): any; + + function pullUpShoot(): any; + + function rebounding(): any; + + function shooting(): any; + + function speed(): any; + + function touches(): any; + + function withTransport(): any; + + namespace catchShoot { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace defense { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace drives { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace passing { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace pullUpShoot { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace rebounding { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace shooting { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace speed { + const defaults: { + season: number; + }; + + const params: string[]; + + } + + namespace touches { + const defaults: { + season: number; + }; + + const params: string[]; + + } + +} + +export namespace stats { + function assistTracker(query: any): any; + + function boxScore(query: any): any; + + function boxScoreSummary(query: any): any; + + function commonTeamRoster(query: any): any; + + function homepageV2(query: any): any; + + function leagueGameLog(query: any): any; + + function leagueLeaders(query: any): any; + + function leagueStandings(query: any): any; + + function lineups(query: any): any; + + function playByPlay(query: any): any; + + function playerClutch(query: any): any; + + function playerCompare(query: any): any; + + function playerHustle(query: any): any; + + function playerHustleLeaders(query: any): any; + + function playerInfo(query: any): any; + + function playerProfile(query: any): any; + + function playerShooting(query: any): any; + + function playerSplits(query: any): any; + + function playerStats(query: any): any; + + function playerTracking(query: any): any; + + function playersInfo(query: any): any; + + function scoreboard(query: any): any; + + function shots(query: any): any; + + function teamClutch(query: any): any; + + function teamHistoricalLeaders(query: any): any; + + function teamHustle(query: any): any; + + function teamHustleLeaders(query: any): any; + + function teamInfoCommon(query: any): any; + + function teamPlayerDashboard(query: any): any; + + function teamPlayerOnOffDetails(query: any): any; + + function teamShooting(query: any): any; + + function teamSplits(query: any): any; + + function teamStats(query: any): any; + + function teamYears(query: any): any; + + function withTransport(transport: any): any; + + namespace assistTracker { + const defaults: { + LeagueID: string; + PerMode: string; + Season: string; + SeasonType: string; + }; + + const parameters: string[]; + + } + + namespace boxScore { + const defaults: { + EndPeriod: string; + EndRange: string; + GameID: string; + RangeType: string; + Season: string; + SeasonType: string; + StartPeriod: string; + StartRange: string; + }; + + const parameters: string[]; + + } + + namespace boxScoreSummary { + const defaults: { + EndPeriod: string; + EndRange: string; + GameID: string; + RangeType: string; + Season: string; + SeasonType: string; + StartPeriod: string; + StartRange: string; + }; + + const parameters: string[]; + + } + + namespace commonTeamRoster { + const defaults: { + LeagueID: string; + Season: string; + TeamID: string; + }; + + const parameters: string[]; + + } + + namespace homepageV2 { + const defaults: { + GameScope: string; + LeagueID: string; + PlayerOrTeam: string; + PlayerScope: string; + Season: string; + SeasonType: string; + StatType: string; + }; + + const parameters: string[]; + + } + + namespace leagueGameLog { + const defaults: { + Counter: string; + DateFrom: string; + DateTo: string; + Direction: string; + LeagueID: string; + PlayerOrTeam: string; + Season: string; + SeasonType: string; + Sorter: string; + }; + + const parameters: string[]; + + } + + namespace leagueLeaders { + const defaults: { + LeagueID: string; + PerMode: string; + Scope: string; + Season: string; + SeasonType: string; + StatCategory: string; + }; + + const parameters: string[]; + + } + + namespace leagueStandings { + const defaults: { + LeagueID: string; + Season: string; + SeasonType: string; + }; + + const parameters: string[]; + + } + + namespace lineups { + const defaults: { + Conference: string; + DateFrom: string; + DateTo: string; + Division: string; + GameSegment: string; + GroupQuantity: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + TeamID: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace playByPlay { + const defaults: { + EndPeriod: string; + GameID: string; + StartPeriod: string; + }; + + const parameters: string[]; + + } + + namespace playerClutch { + const defaults: { + AheadBehind: string; + ClutchTime: string; + College: string; + Conference: string; + Country: string; + DateFrom: string; + DateTo: string; + Division: string; + DraftPick: string; + DraftYear: string; + GameScope: string; + GameSegment: string; + Height: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + PointDiff: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + StarterBench: string; + TeamID: string; + VsConference: string; + VsDivision: string; + Weight: string; + }; + + const parameters: string[]; + + } + + namespace playerCompare { + const defaults: { + DateFrom: string; + DateTo: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerIDList: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + VsConference: string; + VsDivision: string; + VsPlayerIDList: string; + }; + + const parameters: string[]; + + } + + namespace playerHustle { + const defaults: { + College: string; + Conference: string; + Country: string; + DateFrom: string; + DateTo: string; + Division: string; + DraftPick: string; + DraftYear: string; + GameScope: string; + GameSegment: string; + Height: string; + LastNGames: string; + LeagueID: string; + Location: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + StarterBench: string; + TeamID: string; + VsConference: string; + VsDivision: string; + Weight: string; + }; + + const parameters: string[]; + + } + + namespace playerHustleLeaders { + const defaults: { + GameScope: string; + LeagueID: string; + PerMode: string; + PlayerOrTeam: string; + PlayerScope: string; + Season: string; + SeasonType: string; + }; + + const parameters: string[]; + + } + + namespace playerInfo { + const defaults: { + LeagueID: string; + PlayerID: string; + SeasonType: string; + }; + + const parameters: string[]; + + } + + namespace playerProfile { + const defaults: { + LeagueID: string; + PerMode: string; + PlayerID: string; + }; + + const parameters: string[]; + + } + + namespace playerShooting { + const defaults: { + CloseDefDistRange: string; + College: string; + Conference: string; + Country: string; + DateFrom: string; + DateTo: string; + Division: string; + DraftPick: string; + DraftYear: string; + DribbleRange: string; + GameScope: string; + GameSegment: string; + GeneralRange: string; + Height: string; + LastNGames: string; + LeagueID: string; + Location: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + ShotDistRange: string; + StarterBench: string; + TeamID: string; + TouchTimeRange: string; + VsConference: string; + VsDivision: string; + Weight: string; + }; + + const parameters: string[]; + + } + + namespace playerSplits { + const defaults: { + DateFrom: string; + DateTo: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerID: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace playerStats { + const defaults: { + College: string; + Conference: string; + Country: string; + DateFrom: string; + DateTo: string; + Division: string; + DraftPick: string; + DraftYear: string; + GameScope: string; + GameSegment: string; + Height: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + StarterBench: string; + TeamID: string; + VsConference: string; + VsDivision: string; + Weight: string; + }; + + const parameters: string[]; + + } + + namespace playerTracking { + const defaults: { + DateFrom: string; + DateTo: string; + GameScope: string; + LastNGames: string; + Location: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PerMode: string; + PlayerExperience: string; + PlayerOrTeam: string; + PlayerPosition: string; + PtMeasureType: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + StarterBench: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace playersInfo { + const defaults: { + IsOnlyCurrentSeason: string; + LeagueID: string; + Season: string; + }; + + const parameters: string[]; + + } + + namespace scoreboard { + const defaults: { + DayOffset: string; + LeagueID: string; + gameDate: string; + }; + + const parameters: string[]; + + } + + namespace shots { + const defaults: { + AllStarSeason: string; + ContextMeasure: string; + DateFrom: string; + DateTo: string; + GameID: string; + GameScope: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerID: string; + PlayerPosition: string; + PlusMinus: string; + Position: string; + Rank: string; + RookieYear: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + StarterBench: string; + TeamID: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace teamClutch { + const defaults: { + AheadBehind: string; + ClutchTime: string; + Conference: string; + DateFrom: string; + DateTo: string; + Division: string; + GameScope: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + PointDiff: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + StarterBench: string; + TeamID: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace teamHistoricalLeaders { + const defaults: { + LeagueID: string; + Season: string; + TeamID: string; + }; + + const parameters: string[]; + + } + + namespace teamHustle { + const defaults: { + College: string; + Conference: string; + Country: string; + DateFrom: string; + DateTo: string; + Division: string; + DraftPick: string; + DraftYear: string; + GameScope: string; + GameSegment: string; + Height: string; + LastNGames: string; + LeagueID: string; + Location: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + StarterBench: string; + TeamID: string; + VsConference: string; + VsDivision: string; + Weight: string; + }; + + const parameters: string[]; + + } + + namespace teamHustleLeaders { + const defaults: { + GameScope: string; + LeagueID: string; + PerMode: string; + PlayerOrTeam: string; + PlayerScope: string; + Season: string; + SeasonType: string; + }; + + const parameters: string[]; + + } + + namespace teamInfoCommon { + const defaults: { + LeagueID: string; + Season: string; + SeasonType: string; + TeamID: string; + }; + + const parameters: string[]; + + } + + namespace teamPlayerDashboard { + const defaults: { + DateFrom: string; + DateTo: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + TeamID: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace teamPlayerOnOffDetails { + const defaults: { + DateFrom: string; + DateTo: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + TeamID: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace teamShooting { + const defaults: { + CloseDefDistRange: string; + College: string; + Conference: string; + Country: string; + DateFrom: string; + DateTo: string; + Division: string; + DraftPick: string; + DraftYear: string; + DribbleRange: string; + GameScope: string; + GameSegment: string; + GeneralRange: string; + Height: string; + LastNGames: string; + LeagueID: string; + Location: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PORound: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + ShotClockRange: string; + ShotDistRange: string; + StarterBench: string; + TeamID: string; + TouchTimeRange: string; + VsConference: string; + VsDivision: string; + Weight: string; + }; + + const parameters: string[]; + + } + + namespace teamSplits { + const defaults: { + DateFrom: string; + DateTo: string; + GameScope: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + TeamID: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace teamStats { + const defaults: { + AllStarSeason: string; + DateFrom: string; + DateTo: string; + GameScope: string; + GameSegment: string; + LastNGames: string; + LeagueID: string; + Location: string; + MeasureType: string; + Month: string; + OpponentTeamID: string; + Outcome: string; + PaceAdjust: string; + PerMode: string; + Period: string; + PlayerExperience: string; + PlayerPosition: string; + PlusMinus: string; + Rank: string; + Season: string; + SeasonSegment: string; + SeasonType: string; + StarterBench: string; + VsConference: string; + VsDivision: string; + }; + + const parameters: string[]; + + } + + namespace teamYears { + const defaults: { + LeagueID: string; + }; + + const parameters: string[]; + + } + +} + +export namespace synergy { + function playerPlayType(query: any): any; + + function teamPlayType(query: any): any; + + function withTransport(transport: any): any; + + namespace playerPlayType { + const defaults: { + category: any; + limit: number; + name: string; + season: number; + seasonType: string; + }; + + } + + namespace teamPlayType { + const defaults: { + category: any; + limit: number; + name: string; + season: number; + seasonType: string; + }; + + } + +} From 20ccc26a2a2c150436ee86af905e74095aa36b4a Mon Sep 17 00:00:00 2001 From: matteolel Date: Fri, 6 Dec 2019 23:07:39 +0100 Subject: [PATCH 3/4] Update index.d.ts --- index.d.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index fecc342..fb25210 100644 --- a/index.d.ts +++ b/index.d.ts @@ -17,9 +17,21 @@ export const teams: { teamName: string; }[]; -export function allTimePlayers(): any; +export function allTimePlayers(): { + playerId: number; + fullName: string; + activeBetween: number[]; + firstName: string; + lastName: string; +}[]; -export function allTimeTeams(): any; +export function allTimeTeams(): { + teamId: number; + abbreviation: string; + simpleName: string; + location: string; + teamName: string; +}[]; export function findPlayer(str: any): any; From cd711630871ede8e88c04b2fb7602d2882681da5 Mon Sep 17 00:00:00 2001 From: matteolel Date: Fri, 6 Dec 2019 23:13:28 +0100 Subject: [PATCH 4/4] Update index.d.ts --- index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index fb25210..6236329 100644 --- a/index.d.ts +++ b/index.d.ts @@ -17,21 +17,21 @@ export const teams: { teamName: string; }[]; -export function allTimePlayers(): { +export function allTimePlayers(): Promise<{ playerId: number; fullName: string; activeBetween: number[]; firstName: string; lastName: string; -}[]; +}[]>; -export function allTimeTeams(): { +export function allTimeTeams(): Promise<{ teamId: number; abbreviation: string; simpleName: string; location: string; teamName: string; -}[]; +}[]>; export function findPlayer(str: any): any;