You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code assumes that the "expires" property is required, but the documentation says its an optional.
expires optional
The UNIX time at which the alert will expire. (Some alerts sources, unfortunately, do not define expiration time, and in these cases this parameter will not be defined.)
"alerts": [ { "title": "Snowfall Warning", "regions": [ "Sunshine Coast" ], "severity": "warning", "time": 1486412460, "description": "Bands of snow rotating around a low pressure system off the coast will continue to stream across southern Vancouver Island, the Sunshine Coast and the Lower Mainland today. Snowfall amounts across these regions will vary widely depending on the location and intensity of the individual bands. Local amounts of 5 cm or more are likely. Be prepared to adjust your driving with changing road conditions. Visibility may be suddenly reduced at times in heavy snow. Please continue to monitor alerts and forecasts issued by Environment Canada. To report severe weather, send an email to [email protected] or tweet reports to #BCStorm.", "uri": "https://weather.gc.ca/warnings/report_e.html?bc38" } ]
The text was updated successfully, but these errors were encountered:
Hey, thanks for letting me know! The fix is pretty straightforward, and I'll be releasing it later tonight (hopefully). It looks like the Dark Sky API added and changed a number of things recently. I'll incorporate breaking changes ASAP in the new release, and I'll add compatibility for new features in a release shortly after that.
This issue is fixed in version 4.0.0. I'll be taking a more thorough look at the API changes with Dark Sky sometime soon, and I'll release version 4.1.0 that'll support the changes.
I'm getting a crash at line 35 in Alert.swift
The code assumes that the "expires" property is required, but the documentation says its an optional.
https://darksky.net/dev/docs/response
There is currently an alert with no "expire" property at Whistler, but because alerts are temporary in nature, the I'm sure the repro won't last:
https://api.darksky.net/forecast/[key]/50.1149639,-122.9486474
"alerts": [ { "title": "Snowfall Warning", "regions": [ "Sunshine Coast" ], "severity": "warning", "time": 1486412460, "description": "Bands of snow rotating around a low pressure system off the coast will continue to stream across southern Vancouver Island, the Sunshine Coast and the Lower Mainland today. Snowfall amounts across these regions will vary widely depending on the location and intensity of the individual bands. Local amounts of 5 cm or more are likely. Be prepared to adjust your driving with changing road conditions. Visibility may be suddenly reduced at times in heavy snow. Please continue to monitor alerts and forecasts issued by Environment Canada. To report severe weather, send an email to [email protected] or tweet reports to #BCStorm.", "uri": "https://weather.gc.ca/warnings/report_e.html?bc38" } ]
The text was updated successfully, but these errors were encountered: