Hi, i love wttr.in and have been using it for a lot of personal projects lately. I believe wego supports JSON as an output (specified as a "frontend", though I haven't tested this personally). It would be awesome if wttr.in could support JSON output (or specifying any arbitrary frontend I suppose)... maybe something like:
GET /Buffalo - buffalo ny weatherGET /Buffalo?frontend=json - buffalo ny weather with -f json passed to the wego commandThere might need to be some extra processing by wttr.in to specify the appropriate headers to the requesting client to let it know the response is JSON.
If there is interest in this I can take a look at the code and see what I can do
I believe GET /Buffalo.json is of less surprise.
Hi @bahamas10 @dvv, I took the liberty of creating a REST API with JSON support had based on the _wttr.in_ information.
Take a look:
https://goweather.herokuapp.com/weather/Buffalo
Or try execute:
curl -X GET https://goweather.herokuapp.com/weather/Buffalo
If you want to check or contribute with the code (in Go), feel free to visit:
https://github.com/robertoduessmann/weather-api
I hope to help somebody :smiley:
Also, feel free to comment or request new features ;)
I like the idea of JSON output too. @robertoduessmann 's goweather app seems a good idea in theory, but so far it's too bare-bones to be very useful, since it only includes (current?) temperature and wind conditions. I'd want to see a description ("Rainy" or "Sunny"), wind and rain conditions, for both the current time as well as a forecast. Y'know, like a regular weather API.
Hi @curtisgibby , I understood your point of view, thanks for your feedback.
Anyway, if you still have interest in goweather, in the last weeks, we improved the API to try make it easier and useful.
We've added weather description and forecast to 2 days. Take a look and fell free to suggest more things you consider important in a weather API.
Thanks. I am still interested in consuming this API, and the improvements that you've added do make the system much more useful. I created a couple of new issues for further possible refinements.
Nice, I really thank for your comments @curtisgibby . I will work and add the features as soon as possible on API :smile:
Was looking for additional text format options as did not see JSON as a current option. Ideally JSON or XML where I can format out preferred.
In mean time existing text output, how do I add my own text for formatted output, add
at end and maybe
@mikwei I hope that both JSON and XML APIs will be published soon. Currently you can use the single output API; it possible to have using the output you are describing:
$ curl wttr.in/London?format="%l:+%c+%t"
London: ☀️ +15°C
w is for Wind; h is for humidity etc. See the full list in README.md.
There appears to be a solution built in: ?format=j1
@xewl Yes, that's true; thank you for reminding me of this issue. It is fixed now
Most helpful comment
@xewl Yes, that's true; thank you for reminding me of this issue. It is fixed now