Files
gy9vin a362ef9f25 refactor(nalogo): восстановить описание чеков из настроек и использовать локальную библиотеку
- Добавлено восстановление описания чека из настроек при обработке очереди
- Передача telegram_user_id и amount_kopeks через всю цепочку создания чеков
- Переход на локальную исправленную версию библ
2025-12-28 04:58:05 +03:00

41 lines
937 B
Python

"""
User API implementation.
Based on PHP library's Api\\User class.
"""
from typing import Any
from ._http import AsyncHTTPClient
class UserAPI:
"""
User API for user information.
Provides async methods for:
- Getting current user information
Maps to PHP Api\\User functionality.
"""
def __init__(self, http_client: AsyncHTTPClient):
self.http = http_client
async def get(self) -> dict[str, Any]:
"""
Get current user information.
Maps to PHP User::get().
Returns:
Dictionary with user profile data including:
- id, inn, displayName, email, phone
- registration dates, status, restrictions
- avatar, receipt settings, etc.
Raises:
DomainException: For API errors
"""
response = await self.http.get("/user")
return response.json() # type: ignore[no-any-return]