Sync Games¶
Fetches the Detroit Lions game schedule and results for a given season. This powers the Schedule page and Home page schedule snapshot.
API Endpoint¶
GET https://api.lionschedule.me/api/v1/football/games/lions/?season=2025
Fallback: GET https://api.lionschedule.me/api/v1/football/games/?season=2025&team_id=8
| Parameter | Default | Description |
|---|---|---|
season |
2025 |
NFL season year |
What It Does¶
- Fetches all Lions games for the specified season
- Resolves
home_teamandaway_teamForeignKeys to cached Team records - Creates or updates
Gamerecords with scores, status, venue, broadcast info
Data Stored¶
Game: game_id, season, week, game_date, game_datetime, short_name, home_team, away_team, home_score, away_score, status_type (pre/live/post), is_completed, venue_name, broadcast, leaders, linescores, spread_line, total_line, coaches, referee, roof, surface
Response Structure¶
{
"games": [
{
"game_id": "401772722",
"season": 2025,
"week": 1,
"short_name": "DET @ GB",
"home_team_id": 9,
"away_team_id": 8,
"home_score": 24,
"away_score": 17,
"status_type": "post",
"is_completed": true,
"game_datetime": "2025-09-05T20:20:00Z"
}
]
}
Schedule¶
Every 2 hours from 9 AM to 1 AM (game days have frequent score updates).
Management Command¶
python manage.py sync_games --season 2025 --triggered-by manual
Dependencies¶
Requires sync_core to have run first (needs Team records for FK resolution).