o
    ä›eM  ã                   @   sN   d Z ddlmZ ddlmZ ddlmZ dZd edg¡Z	G dd	„ d	eƒZ
d
S )z*
Phlo client, used for Phlo API requests.
é    )ÚPhlos)Ú
BaseClient)ÚRequestzhttps://phlorunner.plivo.comú/Úv1c                   @   s    e Zd Zddd„Zddd„ZdS )	Ú
PhloClientNé   c                 C   s&   t  | ||||¡ t| _t| ƒ| _dS )z\
        The Plivo API client.

        Deals with all the API requests to be made.
        N)r   Ú__init__ÚPHLO_API_BASE_URIÚphlo_base_urir   Úphlo)ÚselfÚauth_idÚ
auth_tokenÚproxiesÚtimeout© r   úI/var/www/html/venv/lib/python3.10/site-packages/plivo/rest/phlo_client.pyr	      s   zPhloClient.__init__c                 C   sZ   |pg }t |d | jgtdd„ |D ƒƒ ¡d fi |dkr!d|ind|i¤Ž}| j |¡S )Nr   c                 S   s   g | ]}t |ƒ‘qS r   )Ústr)Ú.0Úpr   r   r   Ú
<listcomp>   s    z-PhloClient.create_request.<locals>.<listcomp>ÚGETÚparamsÚjson)r   Újoinr   ÚlistÚsessionÚprepare_request)r   ÚmethodÚpathÚdataÚreqr   r   r   Úcreate_request   s   ÿÿÿÿÿüzPhloClient.create_request)NNNr   )NN)Ú__name__Ú
__module__Ú__qualname__r	   r#   r   r   r   r   r      s    
r   N)Ú__doc__Úplivo.resourcesr   Úplivo.rest.base_clientr   Úrequestsr   ÚPHLO_APIr   r
   r   r   r   r   r   Ú<module>   s   