Fixed push call
This commit is contained in:
parent
44a528467a
commit
504b27a834
1 changed files with 8 additions and 8 deletions
|
@ -52,15 +52,15 @@ def send_data_to_openweather(temp, hum, wind, pres, date):
|
||||||
requests_log.setLevel(logging.DEBUG)
|
requests_log.setLevel(logging.DEBUG)
|
||||||
requests_log.propagate = True
|
requests_log.propagate = True
|
||||||
|
|
||||||
url = "/data/3.0/stations?appid=" + openweather_api_key
|
url = "/data/3.0/measurements?appid=" + openweather_api_key
|
||||||
|
|
||||||
data = '{"station_id":"' + openweather_station_id + '",' + \
|
data = '[{"station_id":"' + openweather_station_id + '",' + \
|
||||||
'"dt":"' + str(date) + '",' + \
|
'"dt":' + str(date) + ',' + \
|
||||||
'"temperature":"' + str(temp) + '",' + \
|
'"temperature":' + str(temp) + ',' + \
|
||||||
'"wind_speed":"' + str(wind) + '",' + \
|
'"wind_speed":' + str(wind) + ',' + \
|
||||||
'"pressure":"' + str(pres) + '",' + \
|
'"pressure":' + str(pres) + ',' + \
|
||||||
'"humidity":"' + str(hum) + '"' + \
|
'"humidity":' + str(hum) + '' + \
|
||||||
'}'
|
'}]'
|
||||||
|
|
||||||
header = { "Content-Type" : "application/json" }
|
header = { "Content-Type" : "application/json" }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue