Ë
    Fü´j  ã                  óÀ   — d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	 ddl
Z
ddlmZ ddlmZ dd	lmZ dd
lmZ erddlmZmZ ddlmZ  G d„ de«      Z G d„ de«      Zy)zProvide the Redditors class.é    )Úannotations)Úislice)ÚSimpleNamespace)ÚTYPE_CHECKINGÚAnyN)ÚAPI_PATH)ÚPRAWBase)ÚListingGenerator)Ústream_generator)ÚIterableÚIterator)Úmodelsc                  ó   — e Zd ZdZy)ÚPartialRedditorzKA namespace object that provides a subset of :class:`.Redditor` attributes.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úS/root/workspace/ytshorts/venv/lib/python3.12/site-packages/praw/models/redditors.pyr   r      s   „ ÚUr   r   c                  ó8   — e Zd ZdZdd„Zd	d„Zdd„Zd
d„Zdd„Zy)Ú	RedditorszLRedditors is a Listing class that provides various :class:`.Redditor` lists.c                ó>   — t        | j                  t        d   fi |¤ŽS )a  Return a :class:`.ListingGenerator` for new :class:`.Redditors`.

        :returns: :class:`.Redditor` profiles, which are a type of :class:`.Subreddit`.

        Additional keyword arguments are passed in the initialization of
        :class:`.ListingGenerator`.

        Ú	users_new©r
   Ú_redditr   ©ÚselfÚgenerator_kwargss     r   ÚnewzRedditors.new   s    € ô   §¡¬h°{Ñ.CÑXÐGWÑXÐXr   c              #  óD  K  — t        |«      }	 t        t        |d«      «      }|syddj                  |«      i}	 | j                  j                  t        d   |¬«      }|j                  «       D ]  \  }}t        dd|i|¤Ž–— Œ Œx# t        j                  $ r Y ŒŽw xY w­w)	a  Get user summary data by redditor IDs.

        :param ids: An iterable of redditor fullname IDs.

        :returns: A iterator producing :class:`.PartialRedditor` objects.

        Each ID must be prefixed with ``t2_``.

        Invalid IDs are ignored by the server.

        éd   Úidsú,Úuser_by_fullname)ÚparamsÚfullnameNr   )ÚiterÚlistr   Újoinr   Úgetr   ÚprawcoreÚNotFoundÚitemsr   )r   r$   ÚiterableÚchunkr'   Úresultsr(   Ú	user_datas           r   Úpartial_redditorszRedditors.partial_redditors(   s±   è ø€ ô ˜“9ˆØÜœ ¨#Ó.Ó/ˆEÙØà,1°3·8±8¸E³?Ð+CˆFðØŸ,™,×*Ñ*¬8Ð4FÑ+GÐPVÐ*ÓW�ð
 (/§}¡}£ò FÑ#�˜)Ü%ÑE¨xÐE¸9ÑEÓEðFð øô ×$Ñ$ò áðüs(   ‚8B »$B Á(B ÂBÂB ÂBÂB c                ó>   — t        | j                  t        d   fi |¤ŽS )a  Return a :class:`.ListingGenerator` for popular :class:`.Redditors`.

        :returns: :class:`.Redditor` profiles, which are a type of :class:`.Subreddit`.

        Additional keyword arguments are passed in the initialization of
        :class:`.ListingGenerator`.

        Úusers_popularr   r   s     r   ÚpopularzRedditors.popularD   s    € ô   §¡¬h°Ñ.GÑ\ÐK[Ñ\Ð\r   c                óf   — | j                  |d|¬«       t        | j                  t        d   fi |¤ŽS )a!  Return a :class:`.ListingGenerator` of Redditors for ``query``.

        :param query: The query string to filter Redditors by.

        :returns: :class:`.Redditor`\ s.

        Additional keyword arguments are passed in the initialization of
        :class:`.ListingGenerator`.

        r'   )Ú	argumentsÚkeyÚqÚusers_search)Ú_safely_add_argumentsr
   r   r   )r   Úqueryr    s      r   ÚsearchzRedditors.searchO   s6   € ð 	×"Ñ"Ð-=À8ÈuÐ"ÔUÜ §¡¬h°~Ñ.FÑ[ÐJZÑ[Ð[r   c                ó.   — t        | j                  fi |¤ŽS )a?  Yield new Redditors as they are created.

        Redditors are yielded oldest first. Up to 100 historical Redditors will
        initially be returned.

        Keyword arguments are passed to :func:`.stream_generator`.

        :returns: :class:`.Redditor` profiles, which are a type of :class:`.Subreddit`.

        )r   r!   )r   Ústream_optionss     r   ÚstreamzRedditors.stream]   s   € ô   §¡Ñ;¨NÑ;Ð;r   N)r    r   ÚreturnúIterator[models.Subreddit])r$   zIterable[str]rC   zIterator[PartialRedditor])r>   Ústrr    r   rC   rD   )rA   r   rC   rD   )	r   r   r   r   r!   r4   r7   r?   rB   r   r   r   r   r      s"   „ ÙVó	YóFó8	]ó\ô<r   r   )r   Ú
__future__r   Ú	itertoolsr   Útypesr   Útypingr   r   r-   Ú
praw.constr   Úpraw.models.baser	   Úpraw.models.listing.generatorr
   Úpraw.models.utilr   Úcollections.abcr   r   Úprawr   r   r   r   r   r   ú<module>rP      sH   ðÙ "å "å Ý !ß %ã å Ý %Ý :Ý -áß2åôV�oô VôN<�õ N<r   