GetArrDepBoardWithDetailsRequest {trainR} | R Documentation |
Get all public arrivals and departures
Description
Get all public arrivals and departures for the supplied CRS code within a defined time window, including service details.
Usage
GetArrDepBoardWithDetailsRequest(
crs,
filterCrs = NA,
filterType = "from",
numRows = 150,
timeOffset = 0,
timeWindow = 120,
token = get_token(),
url = "https://lite.realtime.nationalrail.co.uk/OpenLDBWS/ldb11.asmx",
verbose = FALSE
)
Arguments
crs |
(string, 3 characters, alphabetic): The CRS code (see above) of the location for which the request is being made. |
filterCrs |
(string, 3 characters, alphabetic): The CRS code of either an origin or destination location to filter in. Optional. |
filterType |
(string, either "from" or "to"): The type of filter to
apply. Filters services to include only those originating or terminating
at the |
numRows |
(integer, between 0 and 150 exclusive): The number of services to return in the resulting station board. |
timeOffset |
(integer, between -120 and 120 exclusive): An offset in minutes against the current time to provide the station board for. Defaults to 0. |
timeWindow |
(integer, between -120 and 120 exclusive): How far into
the future in minutes, relative to |
token |
Token to access the data feed. The token can be obtained at http://realtime.nationalrail.co.uk/OpenLDBWSRegistration/. |
url |
Data feed source URL. |
verbose |
Boolean flag to indicate whether or not to show status messages. |
Value
Tibble with arrival and departure records.
Examples
## Not run:
rdg<- trainR::GetArrDepBoardWithDetailsRequest("RDG")
rdg <- trainR::GetArrDepBoardWithDetailsRequest("RDG", filterCrs = "BRI")
trainR::print(rdg)
## End(Not run)