Board now support messages
This commit is contained in:
parent
a5022011ed
commit
7e0d381523
@ -1,14 +1,16 @@
|
||||
from datetime import datetime
|
||||
from pyrmv.methods.journey_detail import journey_detail
|
||||
from pyrmv.methods.stop_by_id import stop_by_id
|
||||
|
||||
from pyrmv.classes.Message import Message
|
||||
|
||||
class LineArrival():
|
||||
|
||||
def __init__(self, data, access_id: str):
|
||||
self.journey = journey_detail(access_id, data["JourneyDetailRef"]["ref"])
|
||||
self.status = data["JourneyStatus"]
|
||||
# self.messages = []
|
||||
self.messages = []
|
||||
for message in data["Messages"]["Message"]:
|
||||
self.messages.append(Message(message))
|
||||
self.name = data["name"]
|
||||
self.type = data["type"]
|
||||
self.stop_name = data["stop"]
|
||||
@ -31,7 +33,9 @@ class LineDeparture():
|
||||
def __init__(self, data, access_id: str):
|
||||
self.journey = journey_detail(access_id, data["JourneyDetailRef"]["ref"])
|
||||
self.status = data["JourneyStatus"]
|
||||
# self.messages = []
|
||||
self.messages = []
|
||||
for message in data["Messages"]["Message"]:
|
||||
self.messages.append(Message(message))
|
||||
self.name = data["name"]
|
||||
self.type = data["type"]
|
||||
self.stop_name = data["stop"]
|
||||
|
Loading…
Reference in New Issue
Block a user