From ceb7ce72ba21228b6ddbd45d672522e199c4af2c Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Mon, 18 Mar 2024 21:49:32 +0100 Subject: [PATCH] pulls the departure data --- datapull.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datapull.py b/datapull.py index 0b4536f..41c001c 100644 --- a/datapull.py +++ b/datapull.py @@ -10,11 +10,12 @@ airport = 'EBBR' payload = {'max_pages': 2} auth_header = {'x-apikey':config.FLIGHTAWAREKEY} -response = requests.get(apiUrl + f"airports/{airport}/flights", +response = requests.get(apiUrl + f"airports/{airport}/flights/scheduled_departures", params=payload, headers=auth_header) if response.status_code == 200: - print(response.json()) + departures = response.json() + print(departures) else: print("Error executing request")