pulls the departure data

This commit is contained in:
Arnold Dechamps 2024-03-18 21:49:32 +01:00
parent c78e1d501f
commit ceb7ce72ba
No known key found for this signature in database
GPG key ID: AE66543374E41C89

View file

@ -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")