@@ -32,7 +32,6 @@ class OpenTripPlannerV2:
3232
3333 def __init__ (
3434 self ,
35- api_key : Optional [str ] = None ,
3635 base_url : Optional [str ] = _DEFAULT_BASE_URL ,
3736 user_agent : Optional [str ] = None ,
3837 timeout : Optional [int ] = DEFAULT ,
@@ -45,8 +44,6 @@ def __init__(
4544 """
4645 Initializes an OpenTripPlannerV2 client.
4746
48- :param api_key: NOT USED, only for compatibility with other providers.
49-
5047 :param base_url: The base URL for the request. Defaults to localhost. Should not have a
5148 trailing slash.
5249 :type base_url: str
@@ -148,9 +145,14 @@ def directions(
148145 ) {{
149146 itineraries {{
150147 duration
148+ startTime
149+ endTime
151150 legs {{
151+ startTime
152+ endTime
152153 duration
153154 distance
155+ mode
154156 legGeometry {{
155157 points
156158 }}
@@ -195,7 +197,7 @@ def _parse_legs(self, legs):
195197 geometry = []
196198 for leg in legs :
197199 points = utils .decode_polyline5 (leg ["legGeometry" ]["points" ])
198- geometry .extend (points )
200+ geometry .extend (list ( reversed ( points )) )
199201 distance += int (leg ["distance" ])
200202
201203 return geometry , distance
@@ -283,13 +285,13 @@ def raster(
283285 use. Default: "WALK,TRANSIT"
284286 :type profile: str
285287
286- :time: Departure date and time. The default value is now.
288+ :time: Departure date and time (timezone aware) . The default value is now (UTC) .
287289 :type time: datetime.datetime
288290
289291 :cutoff: The maximum travel duration in seconds. The default value is one hour.
290292
291- :arrive_by: Whether the itinerary should depart at the specified time (False), or arrive to
292- the destination at the specified time (True) . Default value: False.
293+ :arrive_by: Set to False when searching from the location and True when searching to the
294+ location . Default value: False.
293295 :type arrive_by: bool
294296
295297 :param dry_run: Print URL and parameters without sending the request.
0 commit comments