From 6d447a64c51fb43fae0dfb39b28c5be76cbcba33 Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Wed, 5 Oct 2022 21:32:25 +0200 Subject: [PATCH] Types Stop and StopTrip are now supported by board --- pyrmv/methods/board_arrival.py | 3 +++ pyrmv/methods/board_departure.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pyrmv/methods/board_arrival.py b/pyrmv/methods/board_arrival.py index 72db566..0d49a8c 100644 --- a/pyrmv/methods/board_arrival.py +++ b/pyrmv/methods/board_arrival.py @@ -49,6 +49,9 @@ def board_arrival( * BoardArrival: Instance of BoardArrival object. """ + if (isinstance(direction, Stop) or isinstance(direction, StopTrip)): + direction = direction.id + board_raw = raw_board_arrival( accessId=access_id, id=id, diff --git a/pyrmv/methods/board_departure.py b/pyrmv/methods/board_departure.py index a8e4bf7..da7bb90 100644 --- a/pyrmv/methods/board_departure.py +++ b/pyrmv/methods/board_departure.py @@ -49,6 +49,9 @@ def board_departure( * BoardDeparture: Instance of BoardDeparture object. """ + if (isinstance(direction, Stop) or isinstance(direction, StopTrip)): + direction = direction.id + board_raw = raw_board_departure( accessId=access_id, id=id,