
    bf\                     F    d dl mZ d dlmZ d dlmZ  G d de          ZdS )   )_DICT_VERSION_POLL)api_version)Mastodonc                   n    e Zd Z edde          d             Z edde          d             ZddZdS )r   z2.8.0c                 ^    |                      |          }|                     dd|           S )zu
        Fetch information about the poll with the given id

        Returns a :ref:`poll dict <poll dict>`.
        GET/api/v1/polls/)_Mastodon__unpack_id_Mastodon__api_request)selfids     \/home/feoh/.local/pipx/venvs/mastodon-archive/lib/python3.11/site-packages/mastodon/polls.pypollzMastodon.poll   s6     b!!!!%)>")>)>???    c                     |                      |          }t          |t                    s|g}|                     t	                      dg          }|                     dd| d|           dS )a  
        Vote in the given poll.

        `choices` is the index of the choice you wish to register a vote for
        (i.e. its index in the corresponding polls `options` field. In case
        of a poll that allows selection of more than one option, a list of
        indices can be passed.

        You can only submit choices for any given poll once in case of
        single-option polls, or only once per option in case of multi-option
        polls.

        Returns the updated :ref:`poll dict <poll dict>`
        r   POSTr	   z/votesN)r
   
isinstancelist_Mastodon__generate_paramslocalsr   )r   r   choicesparamss       r   	poll_votezMastodon.poll_vote   su      b!!'4(( 	 iG''4&996#>B#>#>#>GGGGGr   Fc                 (    t                      }|d= |S )a  
        Generate a poll object that can be passed as the `poll` option when posting a status.

        options is an array of strings with the poll options (Maximum, by default: 4),
        expires_in is the time in seconds for which the poll should be open.
        Set multiple to True to allow people to choose more than one answer. Set
        hide_totals to True to hide the results of the poll until it has expired.
        r   )r   )r   options
expires_inmultiplehide_totalspoll_paramss         r   	make_pollzMastodon.make_poll1   s     hhr   N)FF)__name__
__module____qualname__r   r   r   r   r     r   r   r   r   	   s         ['#566@ @ 76@ ['#566H H 76H,     r   r   N)versionsr   utilityr   	internalsr   	Internalsr$   r   r   <module>r)      sq    ) ( ( ( ( (             , , , , , ,3 3 3 3 3y 3 3 3 3 3r   