From 930828ae1640c862e71df322c45e04899aa4c4e1 Mon Sep 17 00:00:00 2001 From: Zurdi Date: Fri, 2 Feb 2024 00:20:28 +0100 Subject: [PATCH] filters endpoint added --- backend/endpoints/filters.py | 17 +++++++++++++++++ backend/endpoints/responses/filters.py | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 backend/endpoints/filters.py create mode 100644 backend/endpoints/responses/filters.py diff --git a/backend/endpoints/filters.py b/backend/endpoints/filters.py new file mode 100644 index 000000000..143fc889b --- /dev/null +++ b/backend/endpoints/filters.py @@ -0,0 +1,17 @@ +from endpoints.responses.filters import FiltersReturn +from fastapi import APIRouter + +router = APIRouter() + + +@router.get("/filters") +def stats() -> FiltersReturn: + """Endpoint to return the current RomM stats + + Returns: + dict: Dictionary with all the stats + """ + + return { + "genres": ["Role-playing (RPG)", "Turn-based strategy (TBS)", "Adventure"] + } diff --git a/backend/endpoints/responses/filters.py b/backend/endpoints/responses/filters.py new file mode 100644 index 000000000..466aedc93 --- /dev/null +++ b/backend/endpoints/responses/filters.py @@ -0,0 +1,5 @@ +from typing_extensions import TypedDict + + +class FiltersReturn(TypedDict): + genres: list[str]