Description Usage Arguments Methods (by class) Examples
Save data to the corresponding tables in the SQLite database. Tables includes: price, itinerary, leg, segment, carrier, agent, and place.
1 2 3 4 5 6 7 | dbSaveData(x, conn, ...)
## S3 method for class 'list'
dbSaveData(x, conn, ...)
## S3 method for class 'response'
dbSaveData(x, conn, ...)
|
x |
An object of data to be saved. |
conn |
A |
... |
Further arguments passed to methods. |
list
: Save a list of data.frames in databse.
response
: Save data from the request response in databse.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# Get data from API
apiSetKey("YOUR_API_KEY")
resp <- apiCreateSession(origin = "SFO", destination = "LHR", startDate = "2019-07-01")
resp <- apiPollSession(resp)
data <- flightGet(resp)
# Connect to SQLite database
con <- dbCreateDB(dbname = ":memory:")
dbSaveData(resp, con) # from response
dbSaveData(data, con) # from list
dbDisconnect(con)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.