def get_forecast(latitude, longitude, timestamp=None):
    values = {
        'api_key' : FORECAST_API_KEY,
        'latitude' : latitude,
        'longitude' : longitude,
    }
    if timestamp is None:
        api_url = FORECAST_URL
    else:
        api_url = FORECAST_DATPOINT_URL
        values['timestamp'] = timestamp

    url = api_url % values
    response = requests.get(url)
    data = json.loads(response.text)
    return data
dataset/ETHPy150Open hacktoolkit/hacktoolkit/apis/forecast.io/forecast.py/get_forecast/original