Spaces:
Build error
Build error
Update functions.py
Browse files- functions.py +2 -2
functions.py
CHANGED
@@ -122,9 +122,9 @@ def get_weather_json(city, date, WEATHER_API_KEY):
|
|
122 |
return requests.get(f'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/{city.lower()}/{date}?unitGroup=metric&include=days&key={WEATHER_API_KEY}&contentType=json').json()
|
123 |
|
124 |
|
125 |
-
def get_weather_data(
|
126 |
WEATHER_API_KEY = os.getenv('WEATHER_API_KEY')
|
127 |
-
json = get_weather_json(
|
128 |
data = json['days'][0]
|
129 |
|
130 |
return [
|
|
|
122 |
return requests.get(f'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/{city.lower()}/{date}?unitGroup=metric&include=days&key={WEATHER_API_KEY}&contentType=json').json()
|
123 |
|
124 |
|
125 |
+
def get_weather_data(date):
|
126 |
WEATHER_API_KEY = os.getenv('WEATHER_API_KEY')
|
127 |
+
json = get_weather_json("Malmo", date, WEATHER_API_KEY)
|
128 |
data = json['days'][0]
|
129 |
|
130 |
return [
|