fmidev / weather-app

FMI's official weather application for mobile devices
6 stars 2 forks source link

Timeseries API calls go through without location information #296

Open mkuoremaki opened 2 years ago

mkuoremaki commented 2 years ago

E.g. Oservation:

/timeseries?attributes=fmisid%2Cstationname%2Cdistance&endtime=0&format=json&lang=fi&numberofstations=10&param=distance%2Cepochtime%2Cfmisid%2Cstationname%2CcloudHeight%2CdewPoint%2Chumidity%2Cprecipitation1h%2Cpressure%2Cri_10min%2CsnowDepth%2Ctemperature%2CtotalCloudCover%2Cvisibility%2CwindCompass8%2CwindDirection%2CwindGust%2CwindSpeedMS&precision=double&producer=foreign&starttime=-72h&who=MobileWeather

Forecast

/timeseries?attributes=geoid&endtime=data&format=json&lang=fi&param=geoid%2Cepochtime%2CuvCumulated&producer=uv&starttime=1652770800&tz=utc&who=MobileWeather
evnurm-cgi commented 1 year ago

It seems that the app can indeed call the API without location information (if latitude, longitude, geoid are undefined). The requires a decision on the solution, e.g. show an error message or quietly skip the API call if location is not available.

AnttiRumpunen commented 5 months ago

Quietly skip query. There shouldn't be a situation where there is no location when doing API call.