Session 23: All-day intelligence layer — schedule, game lines, streaks, hot lists, stat filtering, ParlayAPI dead (1567 tests)

This commit is contained in:
Kev
2026-06-12 11:16:58 -04:00
parent 6ab49d4c37
commit 0538205fab
32 changed files with 2276 additions and 2 deletions
+23
View File
@@ -28,6 +28,7 @@ const TTL = Object.freeze({
boxScoreFinal: 24 * 3600,
scoreboard: 1 * 3600,
bvp: 24 * 3600, // BvP doesn't change mid-day — 24h cache is fine
odds: 15 * 60, // Session 23 — book-by-book game lines, 15min
});
function getHost() {
@@ -178,10 +179,32 @@ async function getMLBDailyScoreboard(date) {
}));
}
/**
* getMLBBettingOdds — Tank01's game-level odds feed (book-by-book).
* Chrome Claude confirmed this serves LIVE moneylines, run lines, and
* totals from bet365 / betmgm / caesars (Session 23). Separate from the
* odds-api player-props pipeline; shares the RAPID_API_KEY quota.
*
* Returns the raw `body` (a map keyed by gameID, each carrying a
* per-sportsbook odds object). The gameLines route normalizes it.
*/
async function getMLBBettingOdds(date) {
if (!date) return null;
const ymd = String(date).replace(/-/g, '');
const data = await fetchWithCache(
`/getMLBBettingOdds?gameDate=${ymd}`,
`tank01:mlb:odds:${ymd}`,
TTL.odds,
);
if (data === null) return null;
return data?.body || data;
}
module.exports = {
getMLBBoxScore,
getMLBBatterVsPitcher,
getMLBDailyScoreboard,
getMLBBettingOdds,
hasApiKey,
__internals: {
TTL,