o
    2gL
                     @  s.   d Z ddlmZ ddlmZ G dd dZdS )zProvide the VotableMixin class.    )annotations   )API_PATHc                   @  s2   e Zd ZdZdddZdd Zdd	 Zd
d ZdS )VotableMixinz@Interface for :class:`.RedditBase` classes that can be voted on.	directionintc                 C  s$   | j jtd t|| jdd d S )Nvote)dirid)data)_redditpostr   strfullname)selfr    r   Y/home/garg/my-data/venv/lib/python3.10/site-packages/praw/models/reddit/mixins/votable.py_vote   s   
zVotableMixin._votec                 C     | j dd dS )a  Clear the authenticated user's vote on the object.

        .. note::

            Votes must be cast by humans. That is, API clients proxying a human's action
            one-for-one are OK, but bots deciding how to vote on content or amplifying a
            human's vote are not. See the reddit rules for more details on what
            constitutes vote manipulation. [`Ref
            <https://www.reddit.com/dev/api#POST_api_vote>`_]

        Example usage:

        .. code-block:: python

            submission = reddit.submission("5or86n")
            submission.clear_vote()

            comment = reddit.comment("dxolpyc")
            comment.clear_vote()

        r   r   Nr   r   r   r   r   
clear_vote   s   zVotableMixin.clear_votec                 C  r   )a  Downvote the object.

        .. note::

            Votes must be cast by humans. That is, API clients proxying a human's action
            one-for-one are OK, but bots deciding how to vote on content or amplifying a
            human's vote are not. See the reddit rules for more details on what
            constitutes vote manipulation. [`Ref
            <https://www.reddit.com/dev/api#POST_api_vote>`_]

        Example usage:

        .. code-block:: python

            submission = reddit.submission("5or86n")
            submission.downvote()

            comment = reddit.comment("dxolpyc")
            comment.downvote()

        .. seealso::

            :meth:`.upvote`

        r   Nr   r   r   r   r   downvote(      zVotableMixin.downvotec                 C  r   )a  Upvote the object.

        .. note::

            Votes must be cast by humans. That is, API clients proxying a human's action
            one-for-one are OK, but bots deciding how to vote on content or amplifying a
            human's vote are not. See the reddit rules for more details on what
            constitutes vote manipulation. [`Ref
            <https://www.reddit.com/dev/api#POST_api_vote>`_]

        Example usage:

        .. code-block:: python

            submission = reddit.submission("5or86n")
            submission.upvote()

            comment = reddit.comment("dxolpyc")
            comment.upvote()

        .. seealso::

            :meth:`.downvote`

           r   Nr   r   r   r   r   upvoteD   r   zVotableMixin.upvoteN)r   r   )__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r      s    
r   N)r!   
__future__r   constr   r   r   r   r   r   <module>   s    