getAirportMetadata {openSkies} | R Documentation |
Retrieve metadata for a specified airport
Description
Retrieves the available metadata for a specified airport. These include its IATA code, common name and location, among others. A single airport must be specified using its ICAO code.
Usage
getAirportMetadata(airport, timeOut=60, maxQueryAttempts=1)
Arguments
airport |
string with the ICAO 4-letter code of an airport (for example, \"LEZL\" for Sevilla Airport. |
timeOut |
number of seconds after which the query will time out and return a NULL result. In the default behavior, timeout will be reached after 60 seconds. |
maxQueryAttempts |
On rare occassions, queries to the OpenSky Network live API can return malformed responses. This is the maximum number of attempts to obtain a properly formatted response when carrying out the requested query. It should be noted that the query will still terminate if a timeout is reached. In the default behavior, a single attempt will be performed. It is not recommended to change this to a very large number, since it can lead to long running times. |
Value
An object of class openSkiesAirport
. See the openSkiesAirport
documentation for details on the fields for the class.
References
https://en.wikipedia.org/wiki/List_of_airports_by_IATA_and_ICAO_code
Examples
# Obtain metadata for the airport with ICAO code LEZL
if(interactive()){
getAirportMetadata("LEZL")
}