File: //home/arjun/projects/env/lib64/python3.10/site-packages/tweepy/__pycache__/poll.cpython-310.pyc
o
+we� � @ s: d dl mZmZ d dlmZ g d�ZG dd� dee�ZdS )� )�DataMapping�
HashableID)�parse_datetime)�duration_minutes�end_datetime�id�options�
voting_statusc @ s4 e Zd ZdZdZdd� Zdd� Zdd� Zd d
� ZdS )�PollaX A poll included in a Tweet is not a primary object on any endpoint, but
can be found and expanded in the Tweet object.
The object is available for expansion with
``?expansions=attachments.poll_ids`` to get the condensed object with only
default fields. Use the expansion with the field parameter: ``poll.fields``
when requesting additional fields to complete the object.
.. versionadded:: 4.0
Attributes
----------
data : dict
The JSON data representing the poll.
id : str
Unique identifier of the expanded poll.
options : list
Contains objects describing each choice in the referenced poll.
duration_minutes : int | None
Specifies the total duration of this poll.
end_datetime : datetime.datetime | None
Specifies the end date and time for this poll.
voting_status : str | None
Indicates if this poll is still active and can receive votes, or if the
voting is now closed.
References
----------
https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/poll
)�datar r r r r c C sX || _ |d | _|d | _|�d�| _|�d�| _| jd ur$t| j�| _|�d�| _d S )Nr r r r r )r r r �getr r r r )�selfr � r �D/home/arjun/projects/env/lib/python3.10/site-packages/tweepy/poll.py�__init__8 s
z
Poll.__init__c C �
t | j�S �N)�iterr �r
r r r �__iter__E �
z
Poll.__iter__c C r r )�lenr r r r r �__len__H r zPoll.__len__c C s d| j � d| j� d�S )Nz <Poll id=z options=�>)r r r r r r �__repr__K s z
Poll.__repr__N) �__name__�
__module__�__qualname__�__doc__� __slots__r r r r r r r r r
s
r
N)�
tweepy.mixinsr r �tweepy.utilsr �POLL_FIELDSr
r r r r �<module> s