peyk.platforms.bale.types.poll_option¶
Classes
|
Represent one option of a Bale poll. |
- class peyk.platforms.bale.types.poll_option.PollOption(persistent_id: str = '', text: str = '', voter_count: int = 0)[source]¶
Bases:
objectRepresent one option of a Bale poll.
The Bale documentation does not describe polls, but the live API returns them; the field set mirrors what the server sends (
persistent_idis the stable option identifier, unlike the option’s position).- persistent_id: str = ''¶
- text: str = ''¶
- voter_count: int = 0¶
- classmethod from_dict(data: dict | None) PollOption | None[source]¶
Parse raw Bale data into
PollOption.- Parameters:
data (Optional[dict]) – Raw API object or
None.- Returns:
Parsed object or
None.- Return type:
Optional[PollOption]
- classmethod list_from_result(data: List[dict] | None) List[PollOption] | None[source]¶
Parse a raw option list;
NonestaysNone.