
    g
                     6    d dl mZ d dlmZ dZ G d de      Zy)    )DEFAULT_SENTINEL)	Nominatim)OpenMapQuestc                   F     e Zd ZdZdZdZeedddedd fd
Z fdZ xZ	S )	r   a  Geocoder using MapQuest Open Platform Web Services.

    Documentation at:
        https://developer.mapquest.com/documentation/open/

    MapQuest provides two Geocoding APIs:

    - :class:`geopy.geocoders.OpenMapQuest` (this class) Nominatim-alike API
      which is based on Open data from OpenStreetMap.
    - :class:`geopy.geocoders.MapQuest` MapQuest's own API which is based on
      Licensed data.
    z/nominatim/v1/searchz/nominatim/v1/reversezopen.mapquestapi.comNtimeoutproxiesdomainscheme
user_agentssl_contextadapter_factoryc          	      @    t         	|   |||||||       || _        y)aS  

        :param str api_key: API key provided by MapQuest, required.

        :param int timeout:
            See :attr:`geopy.geocoders.options.default_timeout`.

        :param dict proxies:
            See :attr:`geopy.geocoders.options.default_proxies`.

        :param str domain: Domain where the target Nominatim service
            is hosted.

        :param str scheme:
            See :attr:`geopy.geocoders.options.default_scheme`.

        :param str user_agent:
            See :attr:`geopy.geocoders.options.default_user_agent`.

        :type ssl_context: :class:`ssl.SSLContext`
        :param ssl_context:
            See :attr:`geopy.geocoders.options.default_ssl_context`.

        :param callable adapter_factory:
            See :attr:`geopy.geocoders.options.default_adapter_factory`.

            .. versionadded:: 2.0
        r   N)super__init__api_key)
selfr   r   r	   r
   r   r   r   r   	__class__s
            \/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/geopy/geocoders/openmapquest.pyr   zOpenMapQuest.__init__   s6    P 	!#+ 	 	
     c                 B    | j                   |d<   t        | 	  ||      S )z
        Construct geocoding request url. Overridden.

        :param str base_api: Geocoding function base address - self.api
            or self.reverse_api.

        :param dict params: Geocoding params.

        :return: string URL.
        key)r   r   _construct_url)r   base_apiparamsr   s      r   r   zOpenMapQuest._construct_urlK   s$     uw%h77r   )
__name__
__module____qualname____doc__geocode_pathreverse_pathr   r   r   __classcell__)r   s   @r   r   r      s;     *L*L %$)( 1f8 8r   r   N)geopy.geocoders.baser   geopy.geocoders.nominatimr   __all__r    r   r   <module>r'      s    1 /
P89 P8r   