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