
    i?1i}                        d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 erd dlmZmZ d dlmZmZ  G d d	e
      Ze G d de             Ze G d de             Zy)    )annotations)TYPE_CHECKINGAny)ignore_docs)WithLogDetailsClient)
to_safe_id)ApifyClientApifyClientAsync)
HTTPClientHTTPClientAsyncc                  Z    e Zd ZU ded<   ded<   ded<   ded<   d	ed
<   dddZddZddZy)_BaseBaseClient
str | Noneresource_idstrurldictparamszHTTPClient | HTTPClientAsynchttp_clientzApifyClient | ApifyClientAsyncroot_clientNc                @    || j                    d| S | j                   S )N/)r   )selfpaths     o/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/apify_client/clients/base/base_client.py_urlz_BaseBaseClient._url   s&    hhZq''xx    c                "    i | j                   |S N)r   )r   kwargss     r   _paramsz_BaseBaseClient._params   s     
kk

 	
r   c                l    | j                   | j                  | j                  | j                  d}i ||S )N)base_urlr   r   r   )r   r   r   r   )r   r    optionss      r   _sub_resource_init_optionsz*_BaseBaseClient._sub_resource_init_options"   sC    ++kk++	



 	
r   r   )r   r   r   r   returnr   )r   r   r    r   r&   r   )__name__
__module____qualname____annotations__r   r!   r%    r   r   r   r      s-    	HL--//


r   r   )	metaclassc                  ^    e Zd ZU dZded<   ded<   eddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	d       Zy)

BaseClientzBase class for sub-clients.r   r   r	   r   Nr   r   c               f   |j                  d      rt        d      || _        || _        || _        |xs i | _        || _        || _        | j                   d| j                   | _        | j                  ;t        | j                        | _
        | j                   d| j                   | _        yy)a1  Initialize the sub-client.

        Args:
            base_url (str): Base URL of the API server
            root_client (ApifyClient): The ApifyClient instance under which this resource client exists
            http_client (HTTPClient): The HTTPClient instance to be used in this client
            resource_id (str): ID of the manipulated resource, in case of a single-resource client
            resource_path (str): Path to the resource's endpoint on the API server
            params (dict): Parameters to include in all requests from this client
        r   #resource_path must not end with "/"Nendswith
ValueErrorr#   r   r   r   resource_pathr   r   r   safe_idr   r#   r   r   r   r5   r   s          r   __init__zBaseClient.__init__7       * !!#&BCC &&l*&mm_Ad&8&8%9:'%d&6&67DL((1T\\N3DH (r   )r   r.   r#   r   r   r	   r   r   r   r   r5   r   r   dict | Noner&   Noner'   r(   r)   __doc__r*   r   r8   r+   r   r   r.   r.   0   sy    % #'" 4 4  4 !	 4
   4   4  4  4 
 4  4r   r.   c                  ^    e Zd ZU dZded<   ded<   eddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	d       Zy)
BaseClientAsyncz!Base class for async sub-clients.r   r   r
   r   Nr/   c               f   |j                  d      rt        d      || _        || _        || _        |xs i | _        || _        || _        | j                   d| j                   | _        | j                  ;t        | j                        | _
        | j                   d| j                   | _        yy)aE  Initialize the sub-client.

        Args:
            base_url (str): Base URL of the API server
            root_client (ApifyClientAsync): The ApifyClientAsync instance under which this resource client exists
            http_client (HTTPClientAsync): The HTTPClientAsync instance to be used in this client
            resource_id (str): ID of the manipulated resource, in case of a single-resource client
            resource_path (str): Path to the resource's endpoint on the API server
            params (dict): Parameters to include in all requests from this client
        r   r1   Nr2   r7   s          r   r8   zBaseClientAsync.__init__b   r9   r   )r   r?   r#   r   r   r
   r   r   r   r   r5   r   r   r:   r&   r;   r<   r+   r   r   r?   r?   [   sy    +  !! #'" 4 4  4 &	 4
 % 4   4  4  4 
 4  4r   r?   N)
__future__r   typingr   r   apify_shared.utilsr   apify_client._loggingr   apify_client._utilsr   apify_clientr	   r
   apify_client._http_clientr   r   r   r.   r?   r+   r   r   <module>rH      sd    " % * 6 * :E
 4 
@ '4 '4 '4T '4o '4 '4r   