The icon field is deprecated, no longer documented in the API, and also more complicated in practice, as it can mix multiple conditions, e.g. `...{day,night}/rain,30/snow,60?...`. The space of possible icons is also fairly large -- https://www.weather.gov/forecast-icons to get an idea -- and it's not clear what short string they all map to. So yeah, in theory you could parse and infer a weather condition out of that link, but as you can see it's pretty hacky and already deprecated. The API should really just return a code or enum (e.g. like a WMO code).But maybe there's a cleaner way to infer it. PRs are always welcome.
zie|3 years ago
I don't know why you think it's deprecated? I don't see that anywhere. They just updated the icons in 2015, which for govt API work is practically yesterday :)
I think it's just that the specifications document, like basically all documentation is out-dated. There are many fields in the output that are not in the documented spec.
My weather needs just call directly to api.weather.gov and have done so reliably for a year or two now, whenever the last API I was using started charging or broke or whatever happened to it(I don't even remember what API it was at this point). So I have no need of your project, but I wish you lots of success!
vsergeev|3 years ago
In the meanwhile, I could try to get it working with nearly everything else and try to find a last minute hack for the icons.