Fixed arguments
This commit is contained in:
parent
fe3e839abb
commit
6809e3ae9c
@ -45,7 +45,7 @@ def stop_by_coords(
|
|||||||
if selection_mode == None:
|
if selection_mode == None:
|
||||||
selection_mode = None
|
selection_mode = None
|
||||||
else:
|
else:
|
||||||
selection_mode = (selection_mode.code).upper()
|
selection_mode = selection_mode.code
|
||||||
|
|
||||||
stops = []
|
stops = []
|
||||||
stops_raw = raw_stop_by_coords(
|
stops_raw = raw_stop_by_coords(
|
||||||
@ -55,7 +55,7 @@ def stop_by_coords(
|
|||||||
lang=lang.code,
|
lang=lang.code,
|
||||||
radius=radius,
|
radius=radius,
|
||||||
maxNo=max_number,
|
maxNo=max_number,
|
||||||
stopType=(stop_type.code).upper(),
|
stopType=stop_type.code,
|
||||||
locationSelectionMode=selection_mode
|
locationSelectionMode=selection_mode
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ def stop_by_name(
|
|||||||
if selection_mode == None:
|
if selection_mode == None:
|
||||||
selection_mode = None
|
selection_mode = None
|
||||||
else:
|
else:
|
||||||
selection_mode = (selection_mode.code).upper()
|
selection_mode = selection_mode.code
|
||||||
|
|
||||||
stops = []
|
stops = []
|
||||||
stops_raw = raw_stop_by_name(
|
stops_raw = raw_stop_by_name(
|
||||||
@ -63,14 +63,14 @@ def stop_by_name(
|
|||||||
inputString=query,
|
inputString=query,
|
||||||
lang=lang.code,
|
lang=lang.code,
|
||||||
maxNo=max_number,
|
maxNo=max_number,
|
||||||
stopType=(stop_type.code).upper(),
|
stopType=stop_type.code,
|
||||||
locationSelectionMode=selection_mode,
|
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).upper()
|
filterMode=filter_mode.code
|
||||||
)
|
)
|
||||||
|
|
||||||
find_exception(stops_raw)
|
find_exception(stops_raw)
|
||||||
|
@ -54,7 +54,13 @@ def stop_by_coords(accessId: str,
|
|||||||
payload = {}
|
payload = {}
|
||||||
|
|
||||||
for var, val in locals().items():
|
for var, val in locals().items():
|
||||||
if str(var) not in ["json", "headers", "payload", "raw_response"]:
|
if str(var) == "stopType":
|
||||||
|
if val != None:
|
||||||
|
payload["type"] = val.upper()
|
||||||
|
elif str(var) == "locationSelectionMode":
|
||||||
|
if val != None:
|
||||||
|
payload["locationSelectionMode"] = val.upper()
|
||||||
|
elif str(var) not in ["json", "headers", "payload", "raw_response"]:
|
||||||
if val != None:
|
if val != None:
|
||||||
payload[str(var)] = val
|
payload[str(var)] = val
|
||||||
|
|
||||||
|
@ -68,7 +68,13 @@ def stop_by_name(accessId: str,
|
|||||||
if str(var) == "inputString":
|
if str(var) == "inputString":
|
||||||
if val != None:
|
if val != None:
|
||||||
payload["input"] = val
|
payload["input"] = val
|
||||||
elif str(var) not in ["json", "headers", "payload", "raw_response"]:
|
elif str(var) == "stopType":
|
||||||
|
if val != None:
|
||||||
|
payload["type"] = val.upper()
|
||||||
|
elif str(var) == "filterMode":
|
||||||
|
if val != None:
|
||||||
|
payload["filterMode"] = val.upper()
|
||||||
|
elif str(var) not in ["json", "headers", "payload", "raw_response", "stopType"]:
|
||||||
if val != None:
|
if val != None:
|
||||||
payload[str(var)] = val
|
payload[str(var)] = val
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user