
    =h                     F    d dl mZmZmZ d dlmZ d dlmZ  G d de      Z	y)    )DictOptionalTuple)Response)Clientc                   0   e Zd ZdZdedefdZdedefdZ	 	 	 	 	 	 dd	eded
ee	ee
f      dee	ee
f      dee	eef      deeeef      dee   dedefdZ	 	 	 	 	 	 dd	eded
ee	ee
f      dee	ee
f      dee	eef      deeeef      dee   dedefdZy)Domainzg
    This represents at Twilio API subdomain.

    Like, `api.twilio.com` or `lookups.twilio.com'.
    twiliobase_urlc                      || _         || _        y )N)r
   r   )selfr
   r   s      b/var/www/html/phonemate/phone_mate_backend/venv/lib/python3.12/site-packages/twilio/base/domain.py__init__zDomain.__init__   s         urireturnc                 v    dj                  | j                  j                  d      |j                  d            S )z
        Converts a relative `uri` to an absolute url.
        :param string uri: The relative uri to make absolute.
        :return: An absolute url (based off this domain)
        z{}/{}/)formatr   strip)r   r   s     r   absolute_urlzDomain.absolute_url   s,     ~~dmm11#6		#GGr   Nmethodparamsdataheadersauthtimeoutallow_redirectsc	           
      j    | j                  |      }	| j                  j                  ||	||||||      S )a  
        Makes an HTTP request to this domain.
        :param method: The HTTP method.
        :param uri: The HTTP uri.
        :param params: Query parameters.
        :param data: The request body.
        :param headers: The HTTP headers.
        :param auth: Basic auth tuple of (username, password)
        :param timeout: The request timeout.
        :param allow_redirects: True if the client should follow HTTP
        redirects.
        r   r   r   r   r   r   )r   r
   request
r   r   r   r   r   r   r   r   r   urls
             r   r!   zDomain.request   sH    . ${{""+ # 	
 		
r   c	           
         K   | j                  |      }	| j                  j                  ||	||||||       d{   S 7 w)a  
        Makes an asynchronous HTTP request to this domain.
        :param method: The HTTP method.
        :param uri: The HTTP uri.
        :param params: Query parameters.
        :param data: The request body.
        :param headers: The HTTP headers.
        :param auth: Basic auth tuple of (username, password)
        :param timeout: The request timeout.
        :param allow_redirects: True if the client should follow HTTP
        redirects.
        r    N)r   r
   request_asyncr"   s
             r   r%   zDomain.request_async<   sV     . $[[..+ / 	
 	
 		
 	
s   8A?A)NNNNNF)__name__
__module____qualname____doc__r   strr   r   r   r   objectr   floatboolr   r!   r%    r   r   r	   r	      s   !v ! !H H H /3,0,0*.#' %!
!
 !
 c6k*+	!

 tCK()!
 $sCx.)!
 uS#X'!
 %!
 !
 
!
N /3,0,0*.#' %!
!
 !
 c6k*+	!

 tCK()!
 $sCx.)!
 uS#X'!
 %!
 !
 
!
r   r	   N)
typingr   r   r   twilio.http.responser   twilio.restr   r+   r	   r.   r   r   <module>r2      s    ( ( ) W
V W
r   