Triggered when any event is received from the WebSocket. Carries the raw ``ProtoMessageFetchResult`` envelope this event was extracted from on ``self.raw`` for callers that want to inspect the underlying response fields (cursor, fetch_interval, ws_params, etc.).
Triggered when any event is received from the WebSocket. Carries the raw
ProtoMessageFetchResult envelope this event was extracted from on
self.raw for callers that want to inspect the underlying response
fields (cursor, fetch_interval, ws_params, etc.).
The previous design subclassed ProtoMessageFetchResult directly;
that produced empty fields in practice (the constructor was fed the
inner per-message envelope, not the outer fetch result) and
additionally tripped betterproto2’s metadata machinery whenever the
subclass lived in a different module from the upstream definition.
Signature
Section titled “Signature”class WebsocketResponseEvent(BaseEvent)
WebsocketResponseEvent(raw: Optional[ProtoMessageFetchResult] = None)Parameters
Section titled “Parameters”raw(Optional[ProtoMessageFetchResult], defaultNone)
Attributes
Section titled “Attributes”raw(ProtoMessageFetchResult) =raw if raw is not None else ProtoMessageFetchResult()
Import
Section titled “Import”from TikTokLive.events import WebsocketResponseEvent