A client for accessing the Journey Planner (Rejseplanen) API.
The journeyplanner library can be installed using pip:
$ pip install journeyplanner
client = JourneyPlanner()
dt = datetime(2019, 1, 8, 12, 0, 0)
origin = Endpoint(latitude=55.68325233, longitude=12.57150292, name="noerreport")
destination = Endpoint(latitude=55.67271128, longitude=12.56635308, name="hovedbanen")
trip = client.trip(origin, destination, date=dt.date(), time=dt.time())
print(list(trip))
client = JourneyPlanner()
client.authenticate('USERNAME', 'PASSWORD')
Trip instances have the following attributes:
List of leg instances
Leg instances have the following attributes:
Leg.name
Leg.type
Leg.origin
Leg.destination
Leg.notes