
    {i
                        S r SSKJr  SSKJrJr  SSKrSSKJrJ	r	  SSK
JrJr  \(       a  SSKJr  SS	KJr   " S
 S5      rg)z-Provides the HTTP request handling interface.    )annotations)TYPE_CHECKINGAnyN   )TIMEOUT__version__)InvalidInvocationRequestException)Response)Sessionc                  x    \ rS rSrSrSS jrSSS\4           SS jjrSS jrSS	.       SS
 jjr	Sr
g)	Requestor   z1Requestor provides an interface to HTTP requests.c                f    UR                  S5      (       a  [        e[        U R                  U5      $ )z9Pass all undefined attributes to the ``_http`` attribute.__)
startswithAttributeErrorgetattr_http)self	attributes     L/home/james-whalen/.local/lib/python3.13/site-packages/prawcore/requestor.py__getattr__Requestor.__getattr__   s*    %%  tzz9--    zhttps://oauth.reddit.comzhttps://www.reddit.comNc                    Ub  [        U5      S:  a  Sn[        U5      eU=(       d    [        R                  " 5       U l        U S[
         3U R                  R                  S'   X l        X0l        XPl	        g)a  Create an instance of the Requestor class.

:param user_agent: The user-agent for your application. Please follow Reddit's
    user-agent guidelines: https://github.com/reddit/reddit/wiki/API#rules
:param oauth_url: The URL used to make OAuth requests to the Reddit site
    (default: ``"https://oauth.reddit.com"``).
:param reddit_url: The URL used when obtaining access tokens (default:
    ``"https://www.reddit.com"``).
:param session: A session to handle requests, compatible with
    ``requests.Session()`` (default: ``None``).
:param timeout: How many seconds to wait for the server to send data before
    giving up (default: ``prawcore.const.TIMEOUT``).

N   zuser_agent is not descriptivez
 prawcore/z
User-Agent)
lenr	   requestsr   r   r   headers	oauth_url
reddit_urltimeout)r   
user_agentr!   r"   sessionr#   msgs          r   __init__Requestor.__init__   sh    , Z1!41C#C((2 0 0 2
.8\K=+Q

<("$r   c                6    U R                   R                  5       $ )z%Call close on the underlying session.)r   close)r   s    r   r*   Requestor.close;   s    zz!!r   )r#   c                    U R                   R                  " USU=(       d    U R                  0UD6$ ! [         a  n[	        XBU5      SeSnAff = f)z;Issue the HTTP request capturing any errors that may occur.r#   N)r   requestr#   	Exceptionr
   )r   r#   argskwargsexcs        r   r-   Requestor.request?   sR    	@::%%tWW5LWPVWW 	@"3f54?	@s   03 
AA

A)r   r!   r"   r#   )r   strreturnr   )r$   r3   r!   r3   r"   r3   r%   zSession | Noner#   floatr4   None)r4   r6   )r/   r   r#   zfloat | Noner0   r   r4   r   )__name__
__module____qualname____firstlineno____doc__r   r   r'   r*   r-   __static_attributes__ r   r   r   r      s    ;. 42"&   	
    
B"
 37@@#/@BE@	@ @r   r   )r;   
__future__r   typingr   r   r   constr   r   
exceptionsr	   r
   requests.modelsr   sessionsr   r   r=   r   r   <module>rD      s,    3 " %  ' ;(!5@ 5@r   