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:
@@ -1,8 +1,8 @@
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
from core.enums import Mode, SIGRefType
|
||||
from data.sig_ref import SIGRef
|
||||
from core.enums import ActivityRefType, Mode
|
||||
from data.activity_ref import ActivityRef
|
||||
from data.spot import Spot
|
||||
from providers.spot.sse_spot_provider import SSESpotProvider
|
||||
|
||||
@@ -21,15 +21,15 @@ class WWBOTA(SSESpotProvider):
|
||||
# n-fer activations.
|
||||
refs = []
|
||||
for ref in source_spot["references"]:
|
||||
sigref = SIGRef(
|
||||
activity_ref = ActivityRef(
|
||||
id=ref["reference"],
|
||||
sig="WWBOTA",
|
||||
name=ref["name"],
|
||||
latitude=ref["lat"],
|
||||
longitude=ref["long"],
|
||||
ref_type=SIGRefType.BUNKER,
|
||||
ref_type=ActivityRefType.BUNKER,
|
||||
)
|
||||
refs.append(sigref)
|
||||
refs.append(activity_ref)
|
||||
|
||||
spot = Spot(
|
||||
source=self.name,
|
||||
@@ -52,8 +52,8 @@ class WWBOTA(SSESpotProvider):
|
||||
# WWBOTA does support a special "Test" spot type, we need to avoid adding that.
|
||||
return spot if source_spot["type"] != "Test" else None
|
||||
|
||||
def can_submit_spot(self, sig):
|
||||
return sig == "WWBOTA"
|
||||
def can_submit_spot(self, activity):
|
||||
return activity == "WWBOTA"
|
||||
|
||||
def submit_spot(self, spot, credentials):
|
||||
# TODO: Implement. WWBOTA API docs cover this: https://api.wwbota.org/#tag/Spots/operation/create_spot_spots__post
|
||||
|
||||
Reference in New Issue
Block a user