o
    Ò­Òc;  ã                   @   s$   d Z ddlmZ dd„ Zdd„ ZdS )z3Performs requests to the Google Maps Elevation API.é    )Úconvertc                 C   s"   dt  |¡i}|  d|¡ dg ¡S )aÄ  
    Provides elevation data for locations provided on the surface of the
    earth, including depth locations on the ocean floor (which return negative
    values)

    :param locations: List of latitude/longitude values from which you wish
        to calculate elevation data.
    :type locations: a single location, or a list of locations, where a
        location is a string, dict, list, or tuple

    :rtype: list of elevation data responses
    Ú	locationsú/maps/api/elevation/jsonÚresults)r   Úshortest_pathÚ_requestÚget)Úclientr   Úparams© r   ú`/var/www/html/Testing_prj/Navya-Bakers/venv/lib/python3.10/site-packages/googlemaps/elevation.pyÚ	elevation   s   r   c                 C   s>   t |ƒtu rd| }nt |¡}||dœ}|  d|¡ dg ¡S )a½  
    Provides elevation data sampled along a path on the surface of the earth.

    :param path: An encoded polyline string, or a list of latitude/longitude
        values from which you wish to calculate elevation data.
    :type path: string, dict, list, or tuple

    :param samples: The number of sample points along a path for which to
        return elevation data.
    :type samples: int

    :rtype: list of elevation data responses
    zenc:%s)ÚpathÚsamplesr   r   )ÚtypeÚstrr   r   r   r   )r	   r   r   r
   r   r   r   Úelevation_along_path(   s   

þr   N)Ú__doc__Ú
googlemapsr   r   r   r   r   r   r   Ú<module>   s   