Sessions 29-30: Content templates + PropLine 3-key adapter + MLB Stats API + ESPN summary (1694 tests)

This commit is contained in:
Kev
2026-06-14 22:29:01 -04:00
parent 927c4a5c65
commit a3351e2135
14 changed files with 1091 additions and 27 deletions
+24 -1
View File
@@ -1,6 +1,11 @@
const { getAbbreviation } = require('./teamMap');
const ALLOWED_BOOKS = new Set(['draftkings', 'fanduel', 'betmgm', 'caesars', 'fanatics', 'bet365', 'hardrockbet', 'pointsbet', 'betrivers']);
// Session 30 — PropLine (The-Odds-API-compatible) carries pinnacle, the
// sharp-line reference the odds-api allow-list lacked. Added so PropLine
// prop data through Pinnacle survives normalization. (bovada deliberately
// left OUT — it's the canonical "not-allowed" example in the tests, and
// VYNDR surfaces regulated US books.)
const ALLOWED_BOOKS = new Set(['draftkings', 'fanduel', 'betmgm', 'caesars', 'fanatics', 'bet365', 'hardrockbet', 'pointsbet', 'betrivers', 'pinnacle']);
const MARKET_MAP = {
// NBA / WNBA props
@@ -12,6 +17,24 @@ const MARKET_MAP = {
player_steals: 'steals',
player_points_rebounds_assists: 'pra',
player_turnovers: 'turnovers',
// MLB props (Session 30) — The Odds API + PropLine share these market
// keys for baseball. Without them PropLine/odds-api MLB props would
// normalize to ZERO (MARKET_MAP previously had no baseball keys).
// Internal stat_type names match the streaks/grading engines.
batter_hits: 'hits',
batter_home_runs: 'home_runs',
batter_total_bases: 'total_bases',
batter_rbis: 'rbis',
batter_runs: 'runs',
batter_stolen_bases: 'stolen_bases',
batter_singles: 'singles',
batter_doubles: 'doubles',
batter_walks: 'walks',
batter_strikeouts: 'batter_strikeouts',
pitcher_strikeouts: 'strikeouts',
pitcher_earned_runs: 'earned_runs',
pitcher_hits_allowed: 'hits_allowed',
pitcher_outs: 'outs',
// Soccer props — World Cup 2026 + permanent league support.
// odds-api keys verified against soccer_fifa_world_cup market list.
// 'assists' is shared with NBA — sport context discriminates downstream.