Skip to content

Add news event entity#1

Merged
andreasthell merged 2 commits into
mainfrom
feature/news-event
Jun 9, 2026
Merged

Add news event entity#1
andreasthell merged 2 commits into
mainfrom
feature/news-event

Conversation

@andreasthell

Copy link
Copy Markdown
Owner

Summary

  • Polls https://sunhorizon-app-api2-f4640054350f.herokuapp.com/cw/eib-news every 4 hours for new EIB news items
  • Fires a CheckwattNewsEvent for each new item with attributes: title, title_sv, title_en, category, timestamp
  • Event types: news, update, other (mapped from Kategori field)
  • No JWT sent to external host — endpoint is public, confirmed 200 without auth

Test plan

  • ruff check passes
  • 43 pytest tests pass (3 new for _map_news_event_type)

Polls https://sunhorizon-app-api2-f4640054350f.herokuapp.com/cw/eib-news
every 4 hours and fires a CheckwattNewsEvent for each new item.

Event attributes: title (EN preferred), title_sv, title_en, category, timestamp.
Event types: news, update, other (mapped from Kategori field).
Endpoint is public (returns 200 without auth). Omitting the token
eliminates subdomain-takeover risk if the Heroku app is ever decommissioned.
@andreasthell andreasthell merged commit 99f55eb into main Jun 9, 2026
3 checks passed
@andreasthell andreasthell deleted the feature/news-event branch June 9, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant