Added support for "StopLocation", "CoordLocation"
This commit is contained in:
parent
660c9644f9
commit
8bf1a6fee3
@ -75,5 +75,8 @@ def stop_by_coords(accessId: str,
|
|||||||
else:
|
else:
|
||||||
stops = []
|
stops = []
|
||||||
for stop in output.json()["stopLocationOrCoordLocation"]:
|
for stop in output.json()["stopLocationOrCoordLocation"]:
|
||||||
|
if "StopLocation" in stop:
|
||||||
stops.append(Stop(stop["StopLocation"]))
|
stops.append(Stop(stop["StopLocation"]))
|
||||||
|
elif "CoordLocation" in stop:
|
||||||
|
stops.append(Stop(stop["CoordLocation"]))
|
||||||
return stops
|
return stops
|
@ -89,5 +89,8 @@ def stop_by_name(accessId: str,
|
|||||||
else:
|
else:
|
||||||
stops = []
|
stops = []
|
||||||
for stop in output.json()["stopLocationOrCoordLocation"]:
|
for stop in output.json()["stopLocationOrCoordLocation"]:
|
||||||
|
if "StopLocation" in stop:
|
||||||
stops.append(Stop(stop["StopLocation"]))
|
stops.append(Stop(stop["StopLocation"]))
|
||||||
|
elif "CoordLocation" in stop:
|
||||||
|
stops.append(Stop(stop["CoordLocation"]))
|
||||||
return stops
|
return stops
|
Loading…
Reference in New Issue
Block a user