QPX: Call QPX API

Description Usage Arguments Examples

Description

Function that calls the QPX API and returns the resulting flights

Usage

1
QPX(apikey, origin, destination, date, oneway = TRUE, formatted = TRUE)

Arguments

apikey

The authentication key. See https://developers.google.com/qpx-express/v1/prereqs for details on how to obtain your API key.

origin

Airport or city IATA designator of the origin.

destination

Airport or city IATA designator of the destination.

date

Departure date in YYYY-MM-DD format. If oneway is set to FALSE, the date argument must be a vector of length 2 with depart and return date.

oneway

Boolean identifying if one way or return flight is requested.

formatted

Boolean identifying if the results should be formatted in a R data.frame or returned as a list. The dataframe only contains some of the fields

Examples

1
2
resp <- QPX(apikey = 'yourapikey', origin = 'PSA', destination = 'LON', date = Sys.Date() + 1)
resp <- QPX(apikey = 'yourapikey', origin = 'PSA', destination = 'LON', date = c(Sys.Date() + 1, Sys.Date() + 7), oneway = FALSE)

RossiLorenzo/QPXapi documentation built on May 9, 2019, 10:32 a.m.