Skip to content

Commit 8dd831e

Browse files
committed
main: use totime for maxNumResults in routing mode
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAa
1 parent f72c614 commit 8dd831e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def get_stopdata(stop_point_id, lines):
100100

101101
def get_routedata(start, stop):
102102
parameter = {'startStopId': start, 'endStopId': stop, 'departureTime': unix_epoch_from_now(), 'maxNumResults': 4}
103+
if totime:
104+
parameter['maxNumResults'] = totime
103105
request = requests.get(baseurl.format(url_j), params = parameter)
104-
if request.status_code != 200:
105-
raise Exception
106106
if request.headers['content-type'] != 'application/json;charset=UTF-8':
107107
raise Exception
108108
data = request.json()

0 commit comments

Comments
 (0)