o
    4g                     @   s@   d dl mZmZmZ d dlmZ d dlmZ G dd deZ	dS )    )DictOptionalTuple)Response)Clientc                   @   s  e Zd ZdZdedefddZdedefd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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dZd
S )Domainzg
    This represents at Twilio API subdomain.

    Like, `api.twilio.com` or `lookups.twilio.com'.
    twiliobase_urlc                 C   s   || _ || _d S )N)r   r	   )selfr   r	    r   ^/var/www/html/Testing_prj/Navya-Bakers/venv/lib/python3.10/site-packages/twilio/base/domain.py__init__   s   
zDomain.__init__urireturnc                 C   s   d | jd|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   r   r   r   absolute_url   s   zDomain.absolute_urlNFmethodparamsdataheadersauthtimeoutallow_redirectsc	           
   
   C   s&   |  |}	| jj||	||||||d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   urlr   r   r   r      s   
zDomain.requestc	           
   
      s.   |  |}	| jj||	||||||dI dH S )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   r   r   r   r   <   s   
zDomain.request_async)NNNNNF)__name__
__module____qualname____doc__r   strr   r   r   r   objectr   floatboolr   r   r   r   r   r   r   r      sl    	

'	
r   N)
typingr   r   r   twilio.http.responser   twilio.restr   r%   r   r   r   r   r   <module>   s    