openbahn_journeys: Get details of a specific journey

Description Usage Arguments Details Value Author(s) References Examples

Description

openbahn_journeys returns detailed information on a journey found using departureBoardApi() or arrivalBoardApi().

Usage

1
openbahn_journeys(reference_url)

Arguments

reference_url

character, a reference url of a journey obtained using departureBoardApi() or arrivalBoardApi().

Details

openbahn_journeys() uses the API key stored by openbahn_auth.

Value

A list containing the path, response and content of the GET request.

Author(s)

Philipp Ottolinger

References

http://data.deutschebahn.com/dataset/api-fahrplan

Examples

 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)

ottlngr/openbahn documentation built on May 7, 2019, 9 p.m.