02.10.2019, 08:14
Hi Admin,
I use the same API weather service and web response is the following:
{"request":{"type":"City","query":"Turin, Italy","language":"en","unit":"m"},"location":{"name":"Turin","country":"Italy","region":"Piemonte","lat":"45.050","lon":"7.667","timezone_id":"Europe\/Rome","localtime":"2019-10-02 09:58","localtime_epoch":1570010280,"utc_offset":"2.0"},"current":{"observation_time":"07:58 AM","temperature":16,"weather_code":116,"weather_icons":["https:\/\/assets.weatherstack.com\/images\/wsymbols01_png_64\/wsymbol_0002_sunny_intervals.png"],"weather_descriptions":["Partly cloudy"],"wind_speed":0,"wind_degree":288,"wind_dir":"WNW","pressure":1005,"precip":2.8,"humidity":94,"cloudcover":25,"feelslike":16,"uv_index":5,"visibility":10,"is_day":"yes"}}
to show localtime I use
location = data.location
grp.write('7/1/4', location.localtime)
But result is not "2019-10-02 09:58" but only "2019-10-02 09". Response is not complete. How can read evething?
In order to read "weather_descriptions" between [...] what is the correct instruction?
Thanks.
I use the same API weather service and web response is the following:
{"request":{"type":"City","query":"Turin, Italy","language":"en","unit":"m"},"location":{"name":"Turin","country":"Italy","region":"Piemonte","lat":"45.050","lon":"7.667","timezone_id":"Europe\/Rome","localtime":"2019-10-02 09:58","localtime_epoch":1570010280,"utc_offset":"2.0"},"current":{"observation_time":"07:58 AM","temperature":16,"weather_code":116,"weather_icons":["https:\/\/assets.weatherstack.com\/images\/wsymbols01_png_64\/wsymbol_0002_sunny_intervals.png"],"weather_descriptions":["Partly cloudy"],"wind_speed":0,"wind_degree":288,"wind_dir":"WNW","pressure":1005,"precip":2.8,"humidity":94,"cloudcover":25,"feelslike":16,"uv_index":5,"visibility":10,"is_day":"yes"}}
to show localtime I use
location = data.location
grp.write('7/1/4', location.localtime)
But result is not "2019-10-02 09:58" but only "2019-10-02 09". Response is not complete. How can read evething?
In order to read "weather_descriptions" between [...] what is the correct instruction?
Thanks.