GetDepBoardWithDetailsRequest {trainR} | R Documentation |
Get all public departures
Description
Get all public departures for the supplied CRS code within a defined time window, including service details.
Usage
GetDepBoardWithDetailsRequest(
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 departure records.
Examples
## Not run:
rdg_dep <- trainR::GetDepBoardWithDetailsRequest("RDG")
rdg_dep <- trainR::GetDepBoardWithDetailsRequest("RDG", filterCrs = "BRI")
trainR::print(rdg_dep)
## End(Not run)