apiCreateSession: Create session of live flight search.

Description Usage Arguments Value See Also Examples

Description

Returns live prices from all our suppliers for the requested flight itinerary. This function is POST step. Make sure you have set API using apiSetKey before.

See https://rapidapi.com/skyscanner/api/skyscanner-flight-search.

Usage

1
2
3
4
5
apiCreateSession(origin, destination, startDate, returnDate = NULL,
  adults = 1, children = NULL, infants = NULL, country = "US",
  currency = "USD", locale = "en-US", cabinClass = c("economy",
  "premiumeconomy", "business", "first"), includeCarriers = NULL,
  excludeCarriers = NULL)

Arguments

origin

(REQUIRED) The origin place, can be country, city, airport, in Skyscanner code.

destination

(REQUIRED) The destination, can be country, city, airport, in Skyscanner code.

startDate

(REQUIRED) The outbound date. Format "yyyy-mm-dd".

returnDate

(OPTIONAL) The return date. Format "yyyy-mm-dd". Use NULL for oneway trip.

adults

(REQUIRED) Number of adults (16+ years). Must be between 1 and 8.

children

(OPTIONAL) Number of children (1-16 years). Can be between 0 and 8.

infants

(OPTIONAL) Number of infants (under 12 months). Can be between 0 and 8.

country

(REQUIRED) The market/country your user is in.

currency

(REQUIRED) The currency you want the prices in.

locale

(REQUIRED) The locale you want the results in (ISO locale).

cabinClass

(OPTIONAL) The cabin class. Can be "economy", "premiumeconomy", "business", "first".

includeCarriers

(OPTIONAL) Only return results from those carriers. Comma-separated list of carrier ids.

excludeCarriers

(OPTIONAL) Filter out results from those carriers. Comma-separated list of carrier ids.

Value

A response() object of request.

See Also

apiPollSession.

Examples

1
2
3
4
5
## Not run: 
apiSetKey("YOUR_API_KEY")
apiCreateSession(origin = "SFO", destination = "LHR", startDate = "2019-07-01")

## End(Not run)

MinZhang95/flightscanner documentation built on July 1, 2019, 9:36 p.m.