Skip to content

Stream

SSEEvent

Bases: ITDBaseModel

event

event: str

data

data: dict | None

ConnectedEvent

Bases: ITDBaseModel

user_id

user_id: UUID

timestamp

timestamp: int

NotificationEvent

NotificationEvent(
    notification_id: UUID | str | None = None,
    client: Optional[AsyncITDClient] = None,
    **data,
)

Bases: Notification

user_id

user_id: UUID

sound

sound: bool

id

id: UUID

client

client: Optional[AsyncITDClient] = None

created_at

created_at: ITDDatetime

preview

preview: str | None

is_readed

is_readed: bool

actor

actor: Actor

read_at

read_at: ITDDatetime | None

target_id

target_id: UUID | None

target_type

target_type: Literal['post'] | None

type

read

read(**kwargs) -> bool

Пометить уведомление прочитанным.

RETURNS DESCRIPTION
bool

Успешна ли операция

RAISES DESCRIPTION
UnauthorizedError

ошибка авторизации