Добавлен эндпоинт getEntries

This commit is contained in:
2025-09-29 08:50:34 +03:00
parent fa83caf49d
commit 02a35d0441
3 changed files with 59 additions and 5 deletions

View File

@ -60,3 +60,13 @@ class VITACORE_API(AsyncClient):
case _:
self.logger.error(req.json())
raise e.UnknownException
async def getEntries(self, patId: str):
req = await self.get('/getEntries', params={'patId': patId})
match req.status_code:
case st.HTTP_200_OK:
return s.EntriesModel.model_validate(req.json())
case _:
self.logger.error(req.json())
raise e.UnknownException