o
    2gD                     @  s:   d Z ddlmZ ddlmZ ddlmZ G dd dZdS )	zProvide the SavableMixin class.    )annotations   )API_PATH)_deprecate_argsc                   @  s0   e Zd ZdZedddd
ddZdd	 ZdS )SavableMixinz=Interface for :class:`.RedditBase` classes that can be saved.categoryN)r   
str | Nonec                C  s    | j jtd || jdd dS )a  Save the object.

        :param category: The category to save to. If the authenticated user does not
            have Reddit Premium this value is ignored by Reddit (default: ``None``).

        Example usage:

        .. code-block:: python

            submission = reddit.submission("5or86n")
            submission.save(category="view later")

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

        .. seealso::

            :meth:`.unsave`

        save)r   iddataN_redditpostr   fullname)selfr    r   Y/home/garg/my-data/venv/lib/python3.10/site-packages/praw/models/reddit/mixins/savable.pyr	      s   
zSavableMixin.savec                 C  s   | j jtd d| jid dS )a)  Unsave the object.

        Example usage:

        .. code-block:: python

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

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

        .. seealso::

            :meth:`.save`

        unsaver
   r   Nr   )r   r   r   r   r   &   s   zSavableMixin.unsave)r   r   )__name__
__module____qualname____doc__r   r	   r   r   r   r   r   r   	   s
    r   N)r   
__future__r   constr   utilr   r   r   r   r   r   <module>   s
    