Sync News¶
Fetches Lions and NFL news articles from the API. Powers the News page and home page news section.
API Endpoints¶
GET https://api.lionschedule.me/api/v1/news/topic/lions_nfl/?limit=25
GET https://api.lionschedule.me/api/v1/news/topic/nfl/?limit=10
| Parameter | Default | Description |
|---|---|---|
limit |
25 (lions), 10 (nfl) |
Max articles to fetch per topic |
What It Does¶
- Fetches Lions-specific news articles (topic:
lions_nfl) - Fetches general NFL news articles (topic:
nfl) - Creates or updates
NewsArticlerecords (unique onarticle_id)
Data Stored¶
NewsArticle: article_id, topic, title, slug, url, source, summary, image_url, content, ai_summary, published_at
Response Structure¶
{
"articles": [
{
"article_id": "espn-12345",
"title": "Lions sign key free agent",
"url": "https://www.espn.com/...",
"source": "ESPN",
"summary": "The Detroit Lions have agreed to terms...",
"image_url": "https://a.espncdn.com/...",
"published_at": "2026-03-22T14:30:00Z"
}
]
}
Schedule¶
Every 4 hours. News articles are published throughout the day.
Management Command¶
python manage.py sync_news --lions-limit 25 --nfl-limit 10 --triggered-by manual
Notes¶
- Articles from different sources may have the same story; deduplication is by
article_id - The
ai_summaryfield contains an AI-generated summary when available from the API