Sync Core¶
Fetches the foundational NFL data: conferences, divisions, and teams. This is the first collector that should run since other collectors depend on Team records existing.
API Endpoint¶
GET https://api.lionschedule.me/api/v1/football/core/
No parameters required.
What It Does¶
- Fetches a single payload containing all conferences, divisions, and teams
- Creates or updates
Conferencerecords (AFC, NFC) - Creates or updates
Divisionrecords (NFC North, AFC East, etc.) - Creates or updates
Teamrecords (all 32 NFL teams)
Data Stored¶
Conference: conference_id, name, abbreviation
Division: division_id, name, abbreviation, conference FK
Team: team_id, abbreviation, display_name, location, color, alternate_color, logo_url, slug, venue_name, venue_city, venue_state, venue_indoor, record_summary, standing_summary
Response Structure¶
{
"conferences": [
{"conference_id": 8, "name": "American Football Conference", "abbreviation": "AFC"}
],
"divisions": [
{"division_id": 10, "name": "NFC North", "conference_id": 9}
],
"teams": [
{"team_id": 8, "display_name": "Detroit Lions", "abbreviation": "DET", ...}
]
}
Schedule¶
Run infrequently (daily or on-demand). Team/division data rarely changes.
Management Command¶
python manage.py sync_core --triggered-by manual