Welp, I figured it out.
The answer is that they come in the form of a weatherAlerts {} objects, and within that are alerts.
The object looks like
weatherAlerts: {
name: 'WeatherAlertCollection',
metadata: {
attributionURL: 'https://weatherkit.apple.com/legal-attribution.html',
expireTime: '2023-02-24T02:11:03Z',
language: 'en-US',
latitude: 38.102,
longitude: -121.523,
providerName: 'National Weather Service',
readTime: '2023-02-24T02:06:03Z',
reportedTime: '2023-02-24T02:06:03Z',
version: 1
},
detailsUrl: 'https://weatherkit.apple.com/alertDetails/index.html?ids=6f7b2352-32f7-5bec-8ac8-ca076081a8a6&lang=en-US&timezone=America/Los_Angeles',
alerts: [ [Object] ]
}
And the alerts object looks like this
{
"name": "WeatherAlertSummary",
"id": "6f7b2352-32f7-5bec-8ac8-ca076081a8a6",
"areaId": "caz018",
"areaName": "Carquinez Strait and Delta",
"attributionURL": "https://alerts.weather.gov/cap/wwacapget.php?x=CA126637448CAC.WindAdvisory.1266375FF640CA.STONPWSTO.5ff78b05a939c15640f1e82f369abae7",
"countryCode": "US",
"description": "Wind Advisory",
"token": "WIND_ADVISORY",
"effectiveTime": "2023-02-23T20:35:00Z",
"expireTime": "2023-02-25T00:00:00Z",
"issuedTime": "2023-02-23T20:35:00Z",
"eventEndTime": "2023-02-25T00:00:00Z",
"detailsUrl": "https://weatherkit.apple.com/alertDetails/index.html?ids=6f7b2352-32f7-5bec-8ac8-ca076081a8a6&lang=en-US&timezone=America/Los_Angeles",
"phenomenon": "Wind",
"precedence": 0,
"severity": "minor",
"significance": "advisory",
"source": "National Weather Service",
"eventSource": "US",
"urgency": "expected",
"certainty": "likely",
"importance": "low",
"responses": []
}
However, the reason I was having such a hard time finding any alerts in all of my testing is because the country code and timezone query parameters are required in the request URL. That wasn't explained in the docs, as far as I can tell, and that's incredibly disappointing and frustrating. I hope that can be made more obvious for future developers.
Hope this post itself is helpful for anyone stuck.
Topic:
App & System Services
SubTopic:
General
Tags: