
    bfO
                     ^    d dl Z ddlmZmZ ddlmZ ddlmZ ddlm	Z
  G d de
          Z	dS )	    N   )_DICT_VERSION_PREFERENCES_DICT_VERSION_MARKER)MastodonIllegalArgumentError)api_version)Mastodonc                       e Zd Z edde          d             Z edde          dgfd            Z edde          d             ZdS )r   z2.8.0c                 .    |                      dd          S )z
        Fetch the user's preferences, which can be used to set some default options.
        As of 2.8.0, apps can only fetch, not update preferences.

        Returns a :ref:`preference dict <preference dict>`.
        GETz/api/v1/preferences)_Mastodon__api_request)selfs    b/home/feoh/.local/pipx/venvs/mastodon-archive/lib/python3.11/site-packages/mastodon/preferences.pypreferenceszMastodon.preferences   s     !!%)>???    z3.0.0homec                     t          |t          t          f          s|g}|                     t	                                }|                     dd|          S )aD  
        Get the last-read-location markers for the specified timelines. Valid timelines
        are the same as in :ref:`timeline() <timeline()>`

        Note that despite the singular name, `timeline` can be a list.

        Returns a dict of :ref:`read marker dicts <read marker dicts>`, keyed by timeline name.
        r   /api/v1/markers)
isinstancelisttuple_Mastodon__generate_paramslocalsr   )r   timelineparamss      r   markers_getzMastodon.markers_get   sQ     (T5M22 	" zH''11!!%):FCCCr   c                    t          |t          t          f          s|g}t          |t          t          f          s|g}t          |          t          |          k    rt	          d          t          j                    }t          ||          D ]9\  }}t          j                    ||<   |                     |          ||         d<   :| 	                    dd|d          S )a#  
        Set the "last read" marker(s) for the given timeline(s) to the given id(s)

        Note that if you give an invalid timeline name, this will silently do nothing.

        Returns a dict with the updated :ref:`read marker dicts <read marker dicts>`, keyed by timeline name.
        z6Number of specified timelines and ids must be the samelast_read_idPOSTr   T)use_json)
r   r   r   lenr   collectionsOrderedDictzip_Mastodon__unpack_idr   )r   	timelineslast_read_idsr   r   r   s         r   markers_setzMastodon.markers_set0   s     )dE]33 	$"I-$77 	,*OM}Y//./ghhh(**&))]&C&C 	N 	N"Hl*688F8/3/?/?/M/MF8^,,!!&*;Vd!SSSr   N)	__name__
__module____qualname__r   r   r   r   r   r'    r   r   r   r      s         ['#<==@ @ >=@ ['#788$*8 D D D 98D$ ['#788T T 98T T Tr   r   )r!   versionsr   r   errorsr   utilityr   	internalsr   	Internalsr+   r   r   <module>r1      s        E E E E E E E E 0 0 0 0 0 0             , , , , , ,;T ;T ;T ;T ;Ty ;T ;T ;T ;T ;Tr   