From 87b3e90f020030461e2fc919dddc3974628d93f0 Mon Sep 17 00:00:00 2001 From: PicelBoi Date: Fri, 2 Jan 2026 18:43:34 -0500 Subject: [PATCH] switch to cntyCd since we can use that for intl locations with a different looking area id --- MistWX-i2Me/API/Base.cs | 5 +++++ MistWX-i2Me/API/Products/AlertHeadlinesProduct.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/MistWX-i2Me/API/Base.cs b/MistWX-i2Me/API/Base.cs index bea19d5..58a46a5 100644 --- a/MistWX-i2Me/API/Base.cs +++ b/MistWX-i2Me/API/Base.cs @@ -128,6 +128,11 @@ public class Base } } + if (url.Contains("{cntyId}")) + { + url = url.Replace("{cntyId}", location.cntyId); + } + if (url.Contains("{locId}")) { url = url.Replace("{locId}", location.locId); diff --git a/MistWX-i2Me/API/Products/AlertHeadlinesProduct.cs b/MistWX-i2Me/API/Products/AlertHeadlinesProduct.cs index 8420d78..4b69784 100644 --- a/MistWX-i2Me/API/Products/AlertHeadlinesProduct.cs +++ b/MistWX-i2Me/API/Products/AlertHeadlinesProduct.cs @@ -8,7 +8,7 @@ public class AlertHeadlinesProduct : Base { RecordName = "AlertHeadlines"; DataUrl = - "https://api.weather.com/v3/alerts/headlines?geocode={geocode}&format=json&language=en-US&apiKey={apiKey}"; + "https://api.weather.com/v3/alerts/headlines?areaId={zone}:{cntryCd}&format=json&language=en-US&apiKey={apiKey}"; // ^^ This URL isn't broken, but using the geocode causes it to output the correct zone/county code each time }