extract: Extract data from XML request

Description Usage Arguments Value

View source: R/extract.R

Description

Extract data from XML request

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
extract(x, ...)

## S3 method for class 'ServiceDetails'
extract(x, ...)

## S3 method for class 'ServiceLocation'
extract(x, ...)

## S3 method for class 'StationBoard'
extract(x, ...)

## S3 method for class 'busServices'
extract(x, ...)

## S3 method for class 'callingPoint'
extract(x, ...)

## S3 method for class 'callingPointList'
extract(x, ..., class = "previousCallingPoints")

## S3 method for class 'ferryServices'
extract(x, ...)

## S3 method for class 'nrccMessages'
extract(x, ...)

## S3 method for class 'trainServices'
extract(x, ...)

## S3 method for class 'service'
extract(x, ...)

Arguments

x

List with request results.

...

Optional parameters.

class

String with class of the output object.

Value

Tibble with the appropriate format.

ServiceLocation:

locationName

The name of the location.

crs

The CRS code of this location. A CRS code of ??? indicates an error situation where no crs code is known for this location.

via

An optional via text that should be displayed after the location, to indicate further information about an ambiguous route. Note that vias are only present for ServiceLocation objects that appear in destination lists.

futureChangeTo

A text string containing service type (Bus/Ferry/Train) to which will be changed in the future.

assocIsCancelled

This origin or destination can no longer be reached because the association has been cancelled.

StationBoard:

generatedAt

The time at which the station board was generated.

locationName

The name of the location that the station board is for.

crs

The CRS code of the location that the station board is for.

filterLocationName

If a filter was requested, the location name of the filter location.

filtercrs

If a filter was requested, the CRS code of the filter location.

filterType

If a filter was requested, the type of filter.

nrccMessages

An optional list of textual messages that should be displayed with the station board. The message may include embedded and XML encoded HTML-like hyperlinks and paragraphs. The messages are typically used to display important disruption information that applies to the location that the station board was for. Any embedded <p> tags are used to force a new-line in the output. Embedded <a> tags allow links to external web pages that may provide more information. Output channels that do not support HTML should strip out the <a> tags and just leave the enclosed text.

platformAvailable

An optional value that indicates if platform information is available. If this value is present with the value "true" then platform information will be returned in the service lists. If this value is not present, or has the value "false", then the platform "heading" should be suppressed in the user interface for this station board.

areServicesAvailable

An optional value that indicates if services are currently available for this station board. If this value is present with the value "false" then no services will be returned in the service lists. This value may be set, for example, if access to a station has been closed to the public at short notice, even though the scheduled services are still running. It would be usual in such cases for one of the nrccMessages to describe why the list of services has been suppressed.

trainServices

A list of ServiceItem object for each services of the relevant type that is to appear on the station board. May contain zero items, or may not be present at all.

busServices

A list of ServiceItem object for each services of the relevant type that is to appear on the station board. May contain zero items, or may not be present at all.

ferryServices

A list of ServiceItem object for each services of the relevant type that is to appear on the station board. May contain zero items, or may not be present at all.

callingPoint:

locationName

The display name of this location.

crs

The CRS code of this location. A CRS code of ??? indicates an error situation where no crs code is known for this location.

st

The scheduled time of the service at this location. The time will be either an arrival or departure time, depending on whether it is in the subsequent or previous calling point list.

et

The estimated time of the service at this location. The time will be either an arrival or departure time, depending on whether it is in the subsequent or previous calling point list. Will only be present if an actual time (at) is not present.

at

The actual time of the service at this location. The time will be either an arrival or departure time, depending on whether it is in the subsequent or previous calling point list. Will only be present if an estimated time (et) is not present.

isCancelled

A flag to indicate that this service is cancelled at this location.

length

The train length (number of units) at this location. If not supplied, or zero, the length is unknown.

detachFront

True if the service detaches units from the front at this location.

adhocAlerts

A list of active Adhoc Alert texts for to this location. This list contains an object called AdhocAlertTextType which contains a string to show the Adhoc Alert Text for the location.


villegar/trainR documentation built on Aug. 14, 2021, 10:23 p.m.