Reupload (purge)

This commit is contained in:
gauvainboiche
2026-08-04 16:42:35 +02:00
commit bb74ba5173
1023 changed files with 79600 additions and 0 deletions
@@ -0,0 +1,24 @@
from fastapi import FastAPI
from application.usecases.run_watch_cycle import RunWatchCycleUsecase
from adapters.outbound.rss_feed_adapter import RssFeedAdapter
from adapters.outbound.cli_notifier import CliNotifierAdapter
from domain.matcher import MatchingService
app = FastAPI()
rss_adapter = RssFeedAdapter("https://www.lemonde.fr/rss/une.xml")
notifier = CliNotifierAdapter()
matcher = MatchingService()
usecase = RunWatchCycleUsecase(rss_adapter, notifier, matcher)
@app.get("/rss/{keyword}")
def run_watch_by_http(keyword: str):
result = usecase.execute(keywords=[keyword])
return {
"status": "success",
"keyword_searched": keyword,
"articles_processed": result.processed,
"alerts_sent": result.alerts_sent
}