new features for travelynx
This commit is contained in:
parent
c1279ee2ad
commit
dcee009f80
|
|
@ -29,7 +29,7 @@ def get_api_db():
|
||||||
# Request data from travelynx
|
# Request data from travelynx
|
||||||
def get_api_tl():
|
def get_api_tl():
|
||||||
global tripDataTl
|
global tripDataTl
|
||||||
tripDataTl_response = requests.get("https://travelynx.de/api/v1/status/[YOUR_API_KEY_GOES_HERE", timeout=5)
|
tripDataTl_response = requests.get("https://travelynx.de/api/v1/status/[YOUR API TOKEN", timeout=5)
|
||||||
tripDataTl = tripDataTl_response.json()
|
tripDataTl = tripDataTl_response.json()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ def main():
|
||||||
print(get_trainInfo_db()+" | "+"SPEED: "+get_speed_db()+" km/h | "+"NEXT: "+get_next_db())
|
print(get_trainInfo_db()+" | "+"SPEED: "+get_speed_db()+" km/h | "+"NEXT: "+get_next_db())
|
||||||
else:
|
else:
|
||||||
get_api_tl()
|
get_api_tl()
|
||||||
print(get_trainInfo_tl())
|
print(get_trainInfo_tl()+" | NEXT: "+get_next_tl())
|
||||||
|
|
||||||
if get_ssid() == "WIFI@DB":
|
if get_ssid() == "WIFI@DB":
|
||||||
get_api_tl()
|
get_api_tl()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue