
    bf$                     R    d dl mZ d dlmZ d dlmZ d dlmZ  G d de          ZdS )   )_DICT_VERSION_NOTIFICATION)MastodonIllegalArgumentError)api_version)Mastodonc                       e Zd Z edde          d	d            Z eddd          d             Z eddd          d             ZdS )
r   z1.0.03.5.0Nc
                 
   |	6|$|"|	r|                      dd          rdg}ng d}nt          d          ~	||                     |d          }||                     |d          }||                     |d          }||                     |          }|:|                     t	                      d	g          }
|                     d
d|
          S |                     |          }|                     d
d|           S )a  
        Fetch notifications (mentions, favourites, reblogs, follows) for the logged-in
        user. Pass `account_id` to get only notifications originating from the given account.

        There are different types of notifications:
            * `follow` - A user followed the logged in user
            * `follow_request` - A user has requested to follow the logged in user (for locked accounts)
            * `favourite` - A user favourited a post by the logged in user
            * `reblog` - A user reblogged a post by the logged in user
            * `mention` - A user mentioned the logged in user
            * `poll` - A poll the logged in user created or voted in has ended
            * `update` - A status the logged in user has reblogged (and only those, as of 4.0.0) has been edited
            * `status` - A user that the logged in user has enabned notifications for has enabled `notify` (see :ref:`account_follow() <account_follow()>`)
            * `admin.sign_up` - For accounts with appropriate permissions (TODO: document which those are when adding the permission API): A new user has signed up
            * `admin.report` - For accounts with appropriate permissions (TODO: document which those are when adding the permission API): A new report has been received
        Parameters `exclude_types` and `types` are array of these types, specifying them will in- or exclude the
        types of notifications given. It is legal to give both parameters at the same tine, the result will then
        be the intersection of the results of both filters. Specifying `mentions_only` is a deprecated way to set
        `exclude_types` to all but mentions.

        Can be passed an `id` to fetch a single notification.

        Returns a list of :ref:`notification dicts <notification dicts>`.
        Nr   Tcachedmention)follow	favouritereblogpollfollow_requestz@Cannot specify exclude_types/types when mentions_only is present)dateconvidGETz/api/v1/notifications/api/v1/notifications/)verify_minimum_versionr   _Mastodon__unpack_id_Mastodon__generate_paramslocals_Mastodon__api_request)selfr   
account_idmax_idmin_idsince_idlimitexclude_typestypesmentions_onlyparamss              d/home/feoh/.local/pipx/venvs/mastodon-archive/lib/python3.11/site-packages/mastodon/notifications.pynotificationszMastodon.notifications   s>   4 $$  d22742HH d!*(c(c(c23uvvv%%ft%<<F%%ft%<<F''4'@@H!))*55J:++FHHtf==F%%e-DfMMM!!"%%B%%e-Jb-J-JKKK    c                 2    |                      dd           dS )z2
        Clear out a user's notifications
        POSTz/api/v1/notifications/clearN)r   )r   s    r%   notifications_clearzMastodon.notifications_clearI   s!    
 	6#@AAAAAr'   z1.3.02.9.2c                    |                      |          }|                     dd          r|                     dd| d           dS |                     t	                                }|                     dd|           dS )	z/
        Deletes a single notification
        r+   Tr
   r)   r   z/dismissz/api/v1/notifications/dismissN)r   r   r   r   r   )r   r   r$   s      r%   notifications_dismisszMastodon.notifications_dismissP   s    
 b!!&&wt&<< 	Pv'L'L'L'LMMMMM++FHH55Fv'FOOOOOr'   )	NNNNNNNNN)__name__
__module____qualname__r   r   r&   r*   r-    r'   r%   r   r   
   s         ['#=>>5L 5L 5L ?>5Lt ['7++B B ,+B ['7++
P 
P ,+
P 
P 
Pr'   r   N)	versionsr   errorsr   utilityr   	internalsr   	Internalsr1   r'   r%   <module>r7      s    1 0 0 0 0 0 0 0 0 0 0 0             , , , , , ,QP QP QP QP QPy QP QP QP QP QPr'   