From 07fa2655fe59f8338c3a497689d0c65cd3819a3c Mon Sep 17 00:00:00 2001 From: TheBicPen Date: Sat, 15 Feb 2020 21:32:21 -0500 Subject: [PATCH] periodic radar events caller --- PlacesAPI.py | 4 ++-- callRadar.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 callRadar.py diff --git a/PlacesAPI.py b/PlacesAPI.py index f587f9b..8dc6721 100644 --- a/PlacesAPI.py +++ b/PlacesAPI.py @@ -71,7 +71,7 @@ def find_route(place_ids, mode="transit", departure_time=0): -def radar_events(id): +def radar_events(): h = headers h['Authorization']=RADAR_API_KEY @@ -101,7 +101,7 @@ def radar_events(id): # if input_text == "": # break # print(find_route([place['place_id'] for place in places.values()])) - radar_events(0) + radar_events() #Exit on ctrl+c except KeyboardInterrupt: diff --git a/callRadar.py b/callRadar.py new file mode 100644 index 0000000..92ce9ac --- /dev/null +++ b/callRadar.py @@ -0,0 +1,6 @@ +import time +from . import callRadar + +while True: + await time.sleep(50000) + callRadar()