Module twitchpy.dataclasses.transport

Classes

class Transport (method: str,
callback: str,
session_id: str,
connected_at: datetime.datetime,
disconnected_at: datetime.datetime | None = None,
conduit_id: str | None = None)
Expand source code
@dataclass
class Transport:
    """
    Represents a transport for sending notifications

    Attributes:
        method (str): The transport method
            Possible values are: webhook, websocket, conduit
        callback (str): The callback URL where the notifications are sent
        session_id (str): An ID that identifies the WebSocket that notifications are sent to
        connected_at (datetime): The UTC date and time that the WebSocket connection was established
        disconnected_at (datetime | None): The UTC date and time that the WebSocket connection was lost
        conduit_id (str | None): An ID that identifies the conduit to send notifications to
    """

    method: str
    callback: str
    session_id: str
    connected_at: datetime
    disconnected_at: datetime | None = None
    conduit_id: str | None = None

Represents a transport for sending notifications

Attributes

method : str
The transport method Possible values are: webhook, websocket, conduit
callback : str
The callback URL where the notifications are sent
session_id : str
An ID that identifies the WebSocket that notifications are sent to
connected_at : datetime
The UTC date and time that the WebSocket connection was established
disconnected_at : datetime | None
The UTC date and time that the WebSocket connection was lost
conduit_id : str | None
An ID that identifies the conduit to send notifications to

Class variables

var callback : str

The type of the None singleton.

var conduit_id : str | None

The type of the None singleton.

var connected_at : datetime.datetime

The type of the None singleton.

var disconnected_at : datetime.datetime | None

The type of the None singleton.

var method : str

The type of the None singleton.

var session_id : str

The type of the None singleton.