Small enum fixes
This commit is contained in:
parent
83af5b33da
commit
0719eaacbc
@ -42,6 +42,11 @@ def stop_by_coords(
|
|||||||
* dict: Output from RMV. Dict will contain "errorCode" and "errorText" if exception occurs.
|
* dict: Output from RMV. Dict will contain "errorCode" and "errorText" if exception occurs.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if selection_mode == None:
|
||||||
|
selection_mode = None
|
||||||
|
else:
|
||||||
|
selection_mode = (selection_mode.code).upper()
|
||||||
|
|
||||||
stops = []
|
stops = []
|
||||||
stops_raw = raw_stop_by_coords(
|
stops_raw = raw_stop_by_coords(
|
||||||
accessId=access_id,
|
accessId=access_id,
|
||||||
@ -51,7 +56,7 @@ def stop_by_coords(
|
|||||||
radius=radius,
|
radius=radius,
|
||||||
maxNo=max_number,
|
maxNo=max_number,
|
||||||
stopType=(stop_type.code).upper(),
|
stopType=(stop_type.code).upper(),
|
||||||
locationSelectionMode=(selection_mode.code).upper()
|
locationSelectionMode=selection_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
find_exception(stops_raw)
|
find_exception(stops_raw)
|
||||||
|
@ -52,6 +52,11 @@ def stop_by_name(
|
|||||||
* dict: Output from RMV. Dict will contain "errorCode" and "errorText" if exception occurs.
|
* dict: Output from RMV. Dict will contain "errorCode" and "errorText" if exception occurs.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if selection_mode == None:
|
||||||
|
selection_mode = None
|
||||||
|
else:
|
||||||
|
selection_mode = (selection_mode.code).upper()
|
||||||
|
|
||||||
stops = []
|
stops = []
|
||||||
stops_raw = raw_stop_by_name(
|
stops_raw = raw_stop_by_name(
|
||||||
accessId=access_id,
|
accessId=access_id,
|
||||||
@ -59,13 +64,13 @@ def stop_by_name(
|
|||||||
lang=lang.code,
|
lang=lang.code,
|
||||||
maxNo=max_number,
|
maxNo=max_number,
|
||||||
stopType=(stop_type.code).upper(),
|
stopType=(stop_type.code).upper(),
|
||||||
locationSelectionMode=(selection_mode.code).upper(),
|
locationSelectionMode=selection_mode,
|
||||||
coordLat=coord_lat,
|
coordLat=coord_lat,
|
||||||
coordLong=coord_lon,
|
coordLong=coord_lon,
|
||||||
radius=radius,
|
radius=radius,
|
||||||
refineId=refine_id,
|
refineId=refine_id,
|
||||||
stations=stations,
|
stations=stations,
|
||||||
filterMode=filter_mode.code
|
filterMode=(filter_mode.code).upper()
|
||||||
)
|
)
|
||||||
|
|
||||||
find_exception(stops_raw)
|
find_exception(stops_raw)
|
||||||
|
@ -128,6 +128,11 @@ def trip_find(
|
|||||||
* List[Trip]: List of Trip objects. Empty list if none found.
|
* List[Trip]: List of Trip objects. Empty list if none found.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if real_time_mode == None:
|
||||||
|
real_time_mode = None
|
||||||
|
else:
|
||||||
|
real_time_mode = (real_time_mode.code).upper()
|
||||||
|
|
||||||
trips = []
|
trips = []
|
||||||
trips_raw = raw_trip_find(
|
trips_raw = raw_trip_find(
|
||||||
|
|
||||||
@ -183,7 +188,7 @@ def trip_find(
|
|||||||
|
|
||||||
showPassingPoints=passing_points,
|
showPassingPoints=passing_points,
|
||||||
|
|
||||||
rtMode=(real_time_mode.code).upper(),
|
rtMode=real_time_mode,
|
||||||
|
|
||||||
includeEarlier=include_earlier,
|
includeEarlier=include_earlier,
|
||||||
withICTAlternatives=ict_alternatives,
|
withICTAlternatives=ict_alternatives,
|
||||||
|
Loading…
Reference in New Issue
Block a user