mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-16 00:53:39 +00:00
Update API to have a sensible grouping of sig_refs rather than separate arrays of sig_refs, sig_refs_names and sig_refs_urls
This commit is contained in:
@@ -5,6 +5,7 @@ import pytz
|
||||
from alertproviders.http_alert_provider import HTTPAlertProvider
|
||||
from core.sig_utils import get_icon_for_sig
|
||||
from data.alert import Alert
|
||||
from data.sig_ref import SIGRef
|
||||
|
||||
|
||||
# Alert provider for Worldwide Flora and Fauna
|
||||
@@ -26,7 +27,7 @@ class WWFF(HTTPAlertProvider):
|
||||
freqs_modes=source_alert["band"] + " " + source_alert["mode"],
|
||||
comment=source_alert["remarks"],
|
||||
sig="WWFF",
|
||||
sig_refs=[source_alert["reference"]],
|
||||
sig_refs=[SIGRef(id=source_alert["reference"], url="https://wwff.co/directory/?showRef=" + source_alert["reference"])],
|
||||
icon=get_icon_for_sig("WWFF"),
|
||||
start_time=datetime.strptime(source_alert["utc_start"],
|
||||
"%Y-%m-%d %H:%M:%S").replace(tzinfo=pytz.UTC).timestamp(),
|
||||
|
||||
Reference in New Issue
Block a user