pwaqi/__init__.py
def get_location_observation(lat, lng, token):
    """Lookup observations by geo coordinates."""
    req = requests.get(
        API_ENDPOINT_GEO % (lat, lng),
        params={
            'token': token
        })

    if req.status_code == 200 and req.json()["status"] == "ok":
        return parse_observation_response(req.json()["data"])
    return {}
def get_location_observation(lat, lng, token):
    req = requests.get(
        API_ENDPOINT_GEO % (lat, lng),
        params={
            'token': token
        })

    if req.status_code == 200 and req.json()["status"] == "ok":
        return parse_observation_response(req.json()["data"])
    return {}
def get_location_observation ( lat , lng , token ) : req = requests . get ( API_ENDPOINT_GEO % ( lat , lng ) , params = { 'token' : token } ) if req . status_code == 200 and req . json ( ) [ "status" ] == "ok" : return parse_observation_response ( req . json ( ) [ "data" ] ) return { }
Lookup observations by geo coordinates.
Lookup observations by geo coordinates .