o
    ׋i                     @   s\   d Z ddlmZ ddlmZmZmZ ddlmZ G dd deeZ	G dd deeZ
d	S )
z!linebot.async_http_client module.    )unicode_literals)ABCMetaabstractmethodabstractproperty)with_metaclassc                   @   sX   e Zd ZdZdZefddZedddZeddd	Zedd
dZ	edddZ
dS )AsyncHttpClientz$Abstract Base Classes of HttpClient.   c                 C   s
   || _ dS )a  __init__ method.

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is :py:attr:`DEFAULT_TIMEOUT`
        :type timeout: float | tuple(float, float)
        :rtype: T <= :py:class:`HttpResponse`
        :return: HttpResponse instance
        N)timeout)selfr	    r   ]/home/air/goalskill_sales/back/venv/lib/python3.10/site-packages/linebot/async_http_client.py__init__   s   
zAsyncHttpClient.__init__Nc                       t )a!  GET request.

        :param str url: Request url
        :param dict headers: (optional) Request headers
        :param dict params: (optional) Request query parameter
        :param timeout: (optional), How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is :py:attr:`self.timeout`
        :type timeout: float | tuple(float, float)
        :rtype: T <= :py:class:`HttpResponse`
        :return: HttpResponse instance
        NotImplementedError)r
   urlheadersparamsr	   r   r   r   get*      zAsyncHttpClient.getc                    r   )a>  POST request.

        :param str url: Request url
        :param dict headers: (optional) Request headers
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body
        :param timeout: (optional), How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is :py:attr:`self.timeout`
        :type timeout: float | tuple(float, float)
        :rtype: T <= :py:class:`HttpResponse`
        :return: HttpResponse instance
        r   r
   r   r   datar	   r   r   r   post;   r   zAsyncHttpClient.postc                    r   )a@  DELETE request.

        :param str url: Request url
        :param dict headers: (optional) Request headers
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body
        :param timeout: (optional), How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is :py:attr:`self.timeout`
        :type timeout: float | tuple(float, float)
        :rtype: T <= :py:class:`HttpResponse`
        :return: HttpResponse instance
        r   r   r   r   r   deleteL   r   zAsyncHttpClient.deletec                    r   )aB  PUT request.

        :param str url: Request url
        :param dict headers: (optional) Request headers
        :param data: (optional) Dictionary, bytes, or file-like object to send in the body
        :param timeout: (optional), How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is :py:attr:`self.timeout`
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`AsyncHttpResponse`
        :return: AsyncHttpResponse instance
        r   r   r   r   r   put]   r   zAsyncHttpClient.put)NNN)__name__
__module____qualname____doc__DEFAULT_TIMEOUTr   r   r   r   r   r   r   r   r   r   r      s    r   c                   @   sZ   e Zd ZdZedd Zedd Zedd Zedd	 Zed
d Z	e
dddZdS )AsyncHttpResponsezHttpResponse.c                 C      t )zGet status code.r   r
   r   r   r   status_coder      zAsyncHttpResponse.status_codec                 C   r!   )zGet headers.r   r"   r   r   r   r   w   r$   zAsyncHttpResponse.headersc                    r   )z"Get response body as text-decoded.r   r"   r   r   r   text|      zAsyncHttpResponse.textc                    r   )zGet response body as binary.r   r"   r   r   r   content   r&   zAsyncHttpResponse.contentc                 C   r!   )z"Get response body as json-decoded.r   r"   r   r   r   json   r$   zAsyncHttpResponse.json   c                 C   r!   )zXGet response body as iterator content (stream).

        :param int chunk_size:
        r   )r
   
chunk_sizer   r   r   iter_content   s   zAsyncHttpResponse.iter_contentN)r)   )r   r   r   r   r   r#   r   r%   r'   r(   r   r+   r   r   r   r   r    o   s    




r    N)r   
__future__r   abcr   r   r   future.utilsr   r   r    r   r   r   r   <module>   s   W