2026-02-13 18:18:14 +01:00
|
|
|
from fastapi import Depends, FastAPI
|
2026-05-24 18:36:05 +02:00
|
|
|
from routers import embed, yle_rss_fi, yle_rss_en, yle_rss_sv, the_local, taloustaito,sur,hackernews,fuengirola
|
2026-02-13 18:18:14 +01:00
|
|
|
|
|
|
|
|
from settings.defaults import get_settings
|
|
|
|
|
|
|
|
|
|
app = FastAPI(title='Mastobot', description='Mastodon Feed Automation Service', version=get_settings().version)
|
|
|
|
|
|
|
|
|
|
app.include_router(embed.router, prefix="/embed", tags=["embed"])
|
|
|
|
|
|
|
|
|
|
app.include_router(yle_rss_fi.router, prefix="/rss", tags=["rss"])
|
|
|
|
|
app.include_router(yle_rss_en.router, prefix="/rss", tags=["rss"])
|
2026-05-24 18:36:05 +02:00
|
|
|
app.include_router(yle_rss_sv.router, prefix="/rss", tags=["rss"])
|
2026-02-13 18:18:14 +01:00
|
|
|
app.include_router(the_local.router, prefix="/rss", tags=["rss"])
|
|
|
|
|
app.include_router(taloustaito.router, prefix="/rss", tags=["rss"])
|
|
|
|
|
app.include_router(sur.router, prefix="/rss", tags=["rss"])
|
|
|
|
|
app.include_router(hackernews.router, prefix="/rss", tags=["rss"])
|
|
|
|
|
app.include_router(fuengirola.router, prefix="/rss", tags=["rss"])
|
|
|
|
|
|
|
|
|
|
@app.get("/")
|
|
|
|
|
def read_root():
|
|
|
|
|
return {"message": "Welcome to Mastobot!"}
|
|
|
|
|
|
|
|
|
|
@app.get("/health")
|
|
|
|
|
def health_check():
|
|
|
|
|
return {"status": "healthy"}
|