Module twitchpy.dataclasses.poll
Classes
class Poll (poll_id: str,
channel: Channel,
title: str,
choices: list[PollChoice],
channel_points_voting_enabled: bool,
channel_points_per_vote: int,
status: str,
duration: int,
started_at: datetime.datetime,
ended_at: datetime.datetime | None = None)-
Expand source code
@dataclass class Poll: """ Represents a poll Args: poll_id (str): ID of the poll broadcaster_id (str): ID of the broadcaster broadcaster_name (str): Name of the broadcaster broadcaster_login (str): Login of the broadcaster title (str): Question displayed for the poll choices (list): The poll choices channel_points_voting_enabled (bool): Indicates if Channel Points can be used for voting channel_points_per_vote (int): Number of Channel Points required to vote once with Channel Points status (str): Poll status Valid values are: ACTIVE, COMPLETED, TERMINATED, ARCHIVED, MODERATED, INVALID duration (int): Total duration for the poll (in seconds) started_at (str): UTC timestamp for the poll’s start time ended_at (str): UTC timestamp for the poll’s end time """ poll_id: str channel: Channel title: str choices: list[PollChoice] channel_points_voting_enabled: bool channel_points_per_vote: int status: str duration: int started_at: datetime ended_at: datetime | None = NoneRepresents a poll
Args
poll_id:str- ID of the poll
broadcaster_id:str- ID of the broadcaster
broadcaster_name:str- Name of the broadcaster
broadcaster_login:str- Login of the broadcaster
title:str- Question displayed for the poll
choices:list- The poll choices
channel_points_voting_enabled:bool- Indicates if Channel Points can be used for voting
channel_points_per_vote:int- Number of Channel Points required to vote once with Channel Points
status:str- Poll status Valid values are: ACTIVE, COMPLETED, TERMINATED, ARCHIVED, MODERATED, INVALID
duration:int- Total duration for the poll (in seconds)
started_at:str- UTC timestamp for the poll’s start time
ended_at:str- UTC timestamp for the poll’s end time
Class variables
var channel : Channel-
The type of the None singleton.
var channel_points_per_vote : int-
The type of the None singleton.
var channel_points_voting_enabled : bool-
The type of the None singleton.
var choices : list[PollChoice]-
The type of the None singleton.
var duration : int-
The type of the None singleton.
var ended_at : datetime.datetime | None-
The type of the None singleton.
var poll_id : str-
The type of the None singleton.
var started_at : datetime.datetime-
The type of the None singleton.
var status : str-
The type of the None singleton.
var title : str-
The type of the None singleton.