|
30 | 30 | # www.navitia.io
|
31 | 31 |
|
32 | 32 | from __future__ import absolute_import, print_function, unicode_literals, division
|
33 |
| -from jormungandr import i_manager, fallback_modes, partner_services, app |
| 33 | +from jormungandr import i_manager, fallback_modes, park_modes, partner_services, app |
34 | 34 | from jormungandr.interfaces.v1.ResourceUri import ResourceUri
|
35 | 35 | from datetime import datetime
|
36 | 36 | from jormungandr.resources_utils import ResourceUtc
|
@@ -239,6 +239,20 @@ def __init__(self, output_type_serializer):
|
239 | 239 | action="append",
|
240 | 240 | help='Same as first_section_mode but for the last section.',
|
241 | 241 | )
|
| 242 | + |
| 243 | + parser_get.add_argument( |
| 244 | + "park_mode[]", |
| 245 | + type=OptionValue(park_modes.all_park_modes), |
| 246 | + dest="park_mode", |
| 247 | + action="append", |
| 248 | + help='Force the park mode for the first or last section of a journey\n' |
| 249 | + 'Need to be set with one of the first_section_mode[] or last_section_mode[] corresponding to vehicles that could be parked\n' |
| 250 | + 'Note: Only work with the first or last section mode being a bike for the moment\n' |
| 251 | + 'Eg: If you want to park a bike at the departure, you need:\n' |
| 252 | + '`first_section_mode[]=bike&park_mode[]=on_street`' |
| 253 | + 'Eg: If you want to park a bike at the arrival, you need:\n' |
| 254 | + '`last_section_mode[]=bike&park_mode[]=on_street`', |
| 255 | + ) |
242 | 256 | # for retrocompatibility purpose, we duplicate (without []):
|
243 | 257 | parser_get.add_argument(
|
244 | 258 | "first_section_mode",
|
@@ -506,6 +520,13 @@ def __init__(self, output_type_serializer):
|
506 | 520 | type=int,
|
507 | 521 | help="the additional time added to the taxi section, right before riding the taxi but after hopping off the public transit",
|
508 | 522 | )
|
| 523 | + |
| 524 | + parser_get.add_argument( |
| 525 | + "on_street_bike_parking_duration", |
| 526 | + type=int, |
| 527 | + help="the additional time added to the bike section before and after parking the bike", |
| 528 | + ) |
| 529 | + |
509 | 530 | parser_get.add_argument(
|
510 | 531 | "_pt_planner",
|
511 | 532 | type=OptionValue(['kraken', 'loki']),
|
|
0 commit comments