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:
12
data/sig_ref.py
Normal file
12
data/sig_ref.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
# Data class that defines a Special Interest Group "info" or reference. As well as the basic reference ID we include a
|
||||
# name and a lookup URL.
|
||||
@dataclass
|
||||
class SIGRef:
|
||||
# Reference ID, e.g. "GB-0001".
|
||||
id: str
|
||||
# Name of the reference, e.g. "Null Country Park", if known.
|
||||
name: str = None
|
||||
# URL to look up more information about the reference, if known.
|
||||
url: str = None
|
||||
Reference in New Issue
Block a user