Description Usage Arguments Details Value Author(s) References Examples
openbahn_journeys
returns detailed information on a journey found using departureBoardApi()
or arrivalBoardApi()
.
1 | openbahn_journeys(reference_url)
|
reference_url |
character, a reference url of a journey obtained using |
openbahn_journeys()
uses the API key stored by openbahn_auth
.
A list
containing the path
, response
and content
of the GET
request.
Philipp Ottolinger
http://data.deutschebahn.com/dataset/api-fahrplan
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# Set your API key
openbahn_auth("YOUR_KEY_HERE")
# Get an arrival or departure board for a specific station, date and time
dep <- departureBoardApi("008000240", date = Sys.Date() + 1, time = "12:00")
# Get a reference URL for a specific train in the arrival or departure board
ref <- dep$content$DepartureBoard$Departure$JourneyDetailRef$ref[1]
# Get train details
openbahn_journeys(ref)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.