From 41368c719181009e61e6cf5340c8252d0dfcebcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Fri, 15 Sep 2023 16:54:29 +0000 Subject: [PATCH] doc --- api/advent22_api/core/depends.py | 2 +- api/advent22_api/core/helpers.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/api/advent22_api/core/depends.py b/api/advent22_api/core/depends.py index b8482a6..90f58cf 100644 --- a/api/advent22_api/core/depends.py +++ b/api/advent22_api/core/depends.py @@ -26,7 +26,7 @@ async def get_all_event_days( days: list[int] = Depends(get_all_days), ) -> EventDays: """ - Aktuelles EventDays Objekt + Aktueller Kalender-Zeitraum """ return EventDays.get( diff --git a/api/advent22_api/core/helpers.py b/api/advent22_api/core/helpers.py index 929373b..97228aa 100644 --- a/api/advent22_api/core/helpers.py +++ b/api/advent22_api/core/helpers.py @@ -73,6 +73,15 @@ async def api_return_image(img: Image.Image) -> StreamingResponse: class EventDays(BaseModel): + """ + Kenndaten eines Ereigniszeitraums: + + - `first`: Datum des ersten Ereignisses + - `next`: Datum des nächsten Ereignisses + - `last`: Datum des letzten Ereignisses + - `end`: Letztes Datum Ereigniszeitraums + """ + first: date next: date | None last: date @@ -94,7 +103,7 @@ class EventDays(BaseModel): closing_after: int, ) -> Self: """ - foo bar + Kenndaten des aktuellen (laufenden oder zukünftigen) Ereigniszeitraums bestimmen """ # account for the last event, then add closing period