Turns out what I said yesterday was a lie. I stumbled upon weatherbit.io and I'm now updating the widget to use that API. It helps that I'm stuck in my apartment...
This will actually be great—it supports more weather conditions than DarkSky did, so you'll be able to see haze, sunshowers, and thunderstorms appear!
Anyway, I came here because there's actually a couple of things I could use help with:
First, Weatherbit represents the current moon phase in a very odd way. The documentation says
moonphase
will always be a number between 0 and 1, but nothing else. The API gives these results for the next 16 days:
Code:
April 01: 0.704357
April 02: 0.805858
April 03: 0.892075
April 04: 0.955918
April 05: 0.991704
April 06: 0.996235
April 07: 0.969437
April 08: 0.914326
April 09: 0.836309
April 10: 0.742096
April 11: 0.638569
April 12: 0.531931
April 13: 0.427255
April 14: 0.328442
April 15: 0.328442
April 16: 0.238502