api:misc
Misc
Check location
To make sure to have a valid location, check it with
https://api.forecast.solar/check/:lat/:lon
For example the demo location (center of Germany)
https://api.forecast.solar/check/51.15/10.45
will give this:
{ "result": { "latitude": 51.15, "longitude": 10.45, "place": "99986 Niederdorla, Unstrut-Hainich-Kreis, Thüringen, DE", "timezone": "Europe/Berlin" }, "message": { "code": 0, "type": "success", "text": "", "info": [], "ratelimit": { "period": 3600, "limit": 12, "remaining": 11 } } }
Any invalid location will result in a HTTP status 400
and error code 600
or 601
.
{ "result": null, "message": { "code": 600, "type": "error", "text": "No valid location at ...", "info": [], "ratelimit": { "period": 3600, "limit": 12, "remaining": 10 } } }
api/misc.txt · Last modified: 2022/09/23 14:50 by knutkohl