mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Giant refactor to rebrand "SIG" as "Activity" anywhere that doesn't touch API or config file (which is to be addressed in a future breaking change). #147
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
from core.enums import ActivityRefType
|
||||
|
||||
|
||||
@dataclass
|
||||
class ActivityRef:
|
||||
"""Data class that defines an Activity "info" or reference. As well as the basic reference ID we include a
|
||||
name and a lookup URL."""
|
||||
|
||||
# Activity that this reference is in, e.g. "POTA". Still named "sig" for backwards compatibility with the API.
|
||||
sig: str
|
||||
# Reference ID, e.g. "GB-0001".
|
||||
id: str | None = None
|
||||
# Name of the reference, e.g. "Null Country Park", if known.
|
||||
name: str | None = None
|
||||
# Type of the reference, e.g. "Park", if known.
|
||||
ref_type: ActivityRefType | None = None
|
||||
# URL to look up more information about the reference, if known.
|
||||
url: str | None = None
|
||||
# Icon to use for the reference, derived from the activity. Chosen from the Font Awesome set.
|
||||
icon: str | None = None
|
||||
# Latitude of the reference, in degrees, if known.
|
||||
latitude: float | None = None
|
||||
# Longitude of the reference, in degrees, if known.
|
||||
longitude: float | None = None
|
||||
# Altitude of the reference, in metres, if known.
|
||||
altitude: float | None = None
|
||||
# Maidenhead grid ref of the reference, if known.
|
||||
grid: str | None = None
|
||||
# Activation score. SOTA only
|
||||
activation_score: int | None = None
|
||||
Reference in New Issue
Block a user