GetDepBoardWithDetailsRequest: Get all public departures

Description Usage Arguments Value Examples

View source: R/trainR.R

Description

Get all public departures for the supplied CRS code within a defined time window, including service details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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 filterCrs location. Defaults to "to".

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 timeOffset, to return services for. Defaults to 120.

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

1
2
3
4
5
6
## Not run: 
rdg_dep <- trainR::GetDepBoardWithDetailsRequest("RDG")
rdg_dep <- trainR::GetDepBoardWithDetailsRequest("RDG", filterCrs = "BRI")
trainR::print(rdg_dep)

## End(Not run)

trainR documentation built on Jan. 20, 2021, 5:06 p.m.