
    bfE	                     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_REPORT)MastodonVersionError)api_version)Mastodonc                   h    e Zd Z edde          d             Z edde          dd            ZdS )r   z1.1.0c                 z    |                      dd          rt          d          |                     dd          S )a   
        Fetch a list of reports made by the logged-in user.

        Returns a list of :ref:`report dicts <report dicts>`.

        Warning: This method has now finally been removed, and will not
        work on Mastodon versions 2.5.0 and above.
        z2.5.0T)cachedzAPI removed in Mastodon 2.5.0GETz/api/v1/reports)verify_minimum_versionr   _Mastodon__api_request)selfs    ^/home/feoh/.local/pipx/venvs/mastodon-archive/lib/python3.11/site-packages/mastodon/reports.pyreportszMastodon.reports   sF     &&wt&<< 	H&'FGGG!!%):;;;    z3.5.0NFc                 &    ||dvrt          d                               |          }|&t          |t                    s|g} fd|D             }t	                      }|s|d=                      |          }                     dd|          S )aZ  
        Report statuses to the instances administrators.

        Accepts a list of toot IDs associated with the report, and a comment.

        Starting with Mastodon 3.5.0, you can also pass a `category` (one out of
        "spam", "violation" or "other") and `rule_ids` (a list of rule IDs corresponding
        to the rules returned by the :ref:`instance() <instance()>` API).

        Set `forward` to True to forward a report of a remote user to that users
        instance as well as sending it to the instance local administrators.

        Returns a :ref:`report dict <report dict>`.
        N)spam	violationotherz:Invalid report category (must be spam, violation or other)c                 :    g | ]}                     |          S  )_Mastodon__unpack_id).0xr   s     r   
<listcomp>z#Mastodon.report.<locals>.<listcomp>8   s'    BBB!$**1--BBBr   forwardPOSTz/api/v1/reports/)MastodonIllegalArgumentErrorr   
isinstancelistlocals_Mastodon__generate_paramsr   )	r   
account_id
status_idscommentr   categoryrule_idsparams_initialparamss	   `        r   reportzMastodon.report    s      4R(R(R./klll%%j11
!j$// *(\
BBBBzBBBJ 	*y)''77!!&*<fEEEr   )NNFNN)__name__
__module____qualname__r   r   r   r)   r   r   r   r   r      su         ['#788< < 98<  ['#788F F F 98F F Fr   r   N)	versionsr   errorsr   utilityr   	internalsr   	Internalsr   r   r   <module>r2      s    + * * * * * ( ( ( ( ( (             , , , , , ,4F 4F 4F 4F 4Fy 4F 4F 4F 4F 4Fr   