Integrated journey_detail

This commit is contained in:
Profitroll 2022-10-06 13:04:00 +02:00
parent 1a82665932
commit 3f738f453b

View File

@ -1,13 +1,12 @@
# from pyrmv.methods.journey_detail import journey_detail
from datetime import datetime from datetime import datetime
from pyrmv.methods.journey_detail import journey_detail
from pyrmv.methods.stop_by_id import stop_by_id from pyrmv.methods.stop_by_id import stop_by_id
class LineArrival(): class LineArrival():
def __init__(self, data, access_id: str): def __init__(self, data, access_id: str):
# self.journey = journey_detail(line["JourneyDetailRef"]["ref"]) self.journey = journey_detail(access_id, data["JourneyDetailRef"]["ref"])
self.status = data["JourneyStatus"] self.status = data["JourneyStatus"]
# self.messages = [] # self.messages = []
self.name = data["name"] self.name = data["name"]
@ -30,7 +29,7 @@ class LineArrival():
class LineDeparture(): class LineDeparture():
def __init__(self, data, access_id: str): def __init__(self, data, access_id: str):
# self.journey = journey_detail(line["JourneyDetailRef"]["ref"]) self.journey = journey_detail(access_id, data["JourneyDetailRef"]["ref"])
self.status = data["JourneyStatus"] self.status = data["JourneyStatus"]
# self.messages = [] # self.messages = []
self.name = data["name"] self.name = data["name"]