From 8bf1a6fee3be85663b4613c83414b885c09936e8 Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Sat, 24 Sep 2022 11:41:08 +0200 Subject: [PATCH] Added support for "StopLocation", "CoordLocation" --- pyrmv/raw/stop_by_coords.py | 5 ++++- pyrmv/raw/stop_by_name.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyrmv/raw/stop_by_coords.py b/pyrmv/raw/stop_by_coords.py index 35af6ca..7dde913 100644 --- a/pyrmv/raw/stop_by_coords.py +++ b/pyrmv/raw/stop_by_coords.py @@ -75,5 +75,8 @@ def stop_by_coords(accessId: str, else: stops = [] for stop in output.json()["stopLocationOrCoordLocation"]: - stops.append(Stop(stop["StopLocation"])) + if "StopLocation" in stop: + stops.append(Stop(stop["StopLocation"])) + elif "CoordLocation" in stop: + stops.append(Stop(stop["CoordLocation"])) return stops \ No newline at end of file diff --git a/pyrmv/raw/stop_by_name.py b/pyrmv/raw/stop_by_name.py index 8a668b3..93f8140 100644 --- a/pyrmv/raw/stop_by_name.py +++ b/pyrmv/raw/stop_by_name.py @@ -89,5 +89,8 @@ def stop_by_name(accessId: str, else: stops = [] for stop in output.json()["stopLocationOrCoordLocation"]: - stops.append(Stop(stop["StopLocation"])) + if "StopLocation" in stop: + stops.append(Stop(stop["StopLocation"])) + elif "CoordLocation" in stop: + stops.append(Stop(stop["CoordLocation"])) return stops \ No newline at end of file