-
- read the requirements for that
-
- the package FlightRadarAPI must be installed
- if it is installed and already in use, consider creating a copy of the .api file to use for this module
- parts to edit:
- on line 82
change
to
def get_flights(self, airline = None, bounds = None):
def get_flights(self, airline = None, bounds = None, airport = None, aircraft = None, number = None, registration = None):
- change the block starting on the comment on line 91
# Insert the parameters "airline" and "bounds" in the dictionary for the request. if airline: request_params["airline"] = airline if bounds: request_params["bounds"] = bounds.replace(",", "%2C") if airport: request_params["airport"] = airport if aircraft: request_params["type"] = aircraft if number: request_params["flight"] = number if registration: request_params["reg"] = registration
- replace
with
flights = []
flights = {}
- replace
with
flights.append(Flight(flight_id, flight_info))
flights[flight_id] = flight_info
- on line 82
change