
    bf                     Z    d dl mZmZ d dlmZmZ d dlmZ d dlm	Z
  G d de
          Z	dS )   )_DICT_VERSION_STATUS_DICT_VERSION_CONVERSATION)MastodonIllegalArgumentErrorMastodonNotFoundError)api_version)Mastodonc                   "   e Zd Z edde          dd            Z edde          dd            Z edde          dd            Z edde          dd	            Z edde          dd
            Z	 edde          dd            Z
dS )r   z1.0.0z3.1.4homeNFc	                 N   ||                      |d          }||                      |d          }||                      |d          }t                      }	|s|	d= |s|	d= |s|	d= |dk    rd}d|	d<   |                     |	dg          }
|                     d	d
| |
          S )a  
        Fetch statuses, most recent ones first. `timeline` can be 'home', 'local', 'public',
        'tag/hashtag' or 'list/id'. See the following functions documentation for what those do.

        The default timeline is the "home" timeline.

        Specify `only_media` to only get posts with attached media. Specify `local` to only get local statuses,
        and `remote` to only get remote statuses. Some options are mutually incompatible as dictated by logic.

        May or may not require authentication depending on server settings and what is specifically requested.

        Returns a list of :ref:`status dicts <status dicts>`.
        NT)dateconvlocalremote
only_mediapublictimelineGETz/api/v1/timelines/)_Mastodon__unpack_idlocals_Mastodon__generate_params_Mastodon__api_request)selfr   max_idmin_idsince_idlimitr   r   r   params_initialparamss              _/home/feoh/.local/pipx/venvs/mastodon-archive/lib/python3.11/site-packages/mastodon/timeline.pyr   zMastodon.timeline   s     %%ft%<<F%%ft%<<F''4'@@H 	(w' 	)x( 	-|,wH&*N7#''EE!!%)Hh)H)H&QQQ    c           
      <    |                      d|||||||          S )z
        Convenience method: Fetches the logged-in user's home timeline (i.e. followed users and self). Params as in `timeline()`.

        Returns a list of :ref:`status dicts <status dicts>`.
        r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s           r   timeline_homezMastodon.timeline_home8   s;     }}VF6H\anx  AF  OU}  V  V  	Vr   c                 8    |                      d|||||          S )z
        Convenience method: Fetches the local / instance-wide timeline, not including replies. Params as in `timeline()`.

        Returns a list of :ref:`status dicts <status dicts>`.
        r   )r   r   r   r   r   r"   )r   r   r   r   r   r   s         r   timeline_localzMastodon.timeline_localA   s$     }}WVFX]boy}zzzr   c           
      <    |                      d|||||||          S )z
        Convenience method: Fetches the public / visible-network / federated timeline, not including replies. Params as in `timeline()`.

        Returns a list of :ref:`status dicts <status dicts>`.
        r   r!   r"   r#   s           r   timeline_publiczMastodon.timeline_publicJ   s;     }}XfVh^cpz  CH  QW}  X  X  	Xr   c	           
          |                     d          rt          d          |                     d| |||||||          S )z
        Convenience method: Fetch a timeline of toots with a given hashtag. The hashtag parameter
        should not contain the leading #. Params as in `timeline()`.

        Returns a list of :ref:`status dicts <status dicts>`.
        #z'Hashtag parameter should omit leading #ztag/r!   )
startswithr   r   )	r   hashtagr   r   r   r   r   r   r   s	            r   timeline_hashtagzMastodon.timeline_hashtagS   st     c"" 	;.9; ; ;}}-G--fVV^fk  yC  KP  Y_}  `  `  	`r   z2.1.0c	           
      l    |                      |          }|                     d| |||||||          S )z
        Convenience method: Fetches a timeline containing all the toots by users in a given list. Params as in `timeline()`.

        Returns a list of :ref:`status dicts <status dicts>`.
        zlist/r!   )r   r   )	r   idr   r   r   r   r   r   r   s	            r   timeline_listzMastodon.timeline_list`   sU     b!!}}\R\\&RZbgt~  GL  U[}  \  \  	\r   )r
   NNNNFFF)NNNNFFF)NNNNF)FNNNNFF)__name__
__module____qualname__r   r   r   r$   r&   r(   r-   r0    r   r   r   r   
   sO        ['#788'R 'R 'R 98'RR ['#788V V V 98V ['#788{ { { 98{ ['#788X X X 98X ['#788
` 
` 
` 98
` ['#788\ \ \ 98\ \ \r   r   N)versionsr   r   errorsr   r   utilityr   	internalsr   	Internalsr4   r   r   <module>r:      s    G F F F F F F F G G G G G G G G             , , , , , ,^\ ^\ ^\ ^\ ^\y ^\ ^\ ^\ ^\ ^\r   