Basic working Weather logic

This commit is contained in:
2025-02-17 22:04:09 +01:00
parent 794de0c054
commit 108257e6b8
21 changed files with 520 additions and 345 deletions

View File

@@ -0,0 +1,5 @@
{
"dev": {
"apikey": "1d25d5c991dca5a0554ed4f59b34d634"
}
}

20
apitests/openweather.http Normal file
View File

@@ -0,0 +1,20 @@
### GET Geo Position
@city_name = Rivanazzano Terme
@country_code = IT
@limit = 2
GET http://api.openweathermap.org/geo/1.0/direct?q={{city_name}},{{country_code}}&limit={{limit}}&
appid={{apikey}}
Accept: application/json
> {%
client.global.set("geo", response.body[0]);
%}
### GET Forecast
GET api.openweathermap.org/data/2.5/forecast?lat={{geo.lat}}&lon={{geo.lon}}&appid={{apikey}}
Accept: application/json
### GET Now Weather
GET http://api.openweathermap.org/data/2.5/weather?lat={{geo.lat}}&lon={{geo.lon}}&appid={{apikey}}
Accept: application/json