On 2015/05/19 10:38, Frederic Cambus wrote: > Thanks for taking care of this Brian! As I said off-list, the changes > looks great, and it makes sense to default on using ftp on OpenBSD.
Good - I've just imported this. > @sthen: Indeed, just queried the API manually for verification and > both "Bogustownname" and "Ottery Saint Mary" return data for > Birmingham. > > Could it be that Birmingham is some kind of geographical centre and > the API defaults to it when it doesn't have data for a UK location? Hmm this is possible. I wonder how http://openweathermap.org/find?q=ottery+st+mary is working though. This returns http://openweathermap.org/city/2640834 and this is a valid id suitable for feeding to an ?id= parameter. Do you think it might be worth ansiweather detecting if location is all- numeric and switching from q= to id=? $ curl -s http://api.openweathermap.org/data/2.5/weather?id=2640834 | jq . { "coord": { "lon": -3.27, "lat": 50.75 }, "sys": { "message": 0.0073, "country": "GB", "sunrise": 1432009089, "sunset": 1432065656 }, "weather": [ { "id": 803, "main": "Clouds", "description": "broken clouds", "icon": "04d" } ], "base": "stations", "main": { "temp": 282.709, "temp_min": 282.709, "temp_max": 282.709, "pressure": 1009.71, "sea_level": 1019.92, "grnd_level": 1009.71, "humidity": 77 }, "wind": { "speed": 7.61, "deg": 283.001 }, "clouds": { "all": 68 }, "dt": 1432025053, "id": 2640834, "name": "Ottery Saint Mary", "cod": 200 }
