Get flight data from source. Includes: price, itineraries, legs, segments, carriers, agents, and places. Data are in tibble() form.

flightGet(x, ...)

# S3 method for response
flightGet(x, ...)

# S3 method for SQLiteConnection
flightGet(x, ...)

Arguments

x

An object to get data from.

...

Further arguments passed to methods.

Value

A list of tibbles.

Methods (by class)

  • response: Get flight data from API response.

  • SQLiteConnection: Get flight data from SQLite connection.

Examples

# NOT RUN {
# Get data from API
apiSetKey("YOUR_API_KEY")
resp <- apiCreateSession(origin = "SFO", destination = "LHR", startDate = "2019-07-01")
resp <- apiPollSession(resp)
flightGet(resp)

# Get data from SQLite database
con <- dbCreateDB(dbname = "flight.db")
flightGet(con)
dbDisconnect(con)
# }