Skip to content

Latest commit

 

History

History

wmata_rail_realtime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

@datafire/wmata_rail_realtime

Client library for Real-Time Rail Predictions

Installation and Usage

npm install --save @datafire/wmata_rail_realtime
let wmata_rail_realtime = require('@datafire/wmata_rail_realtime').create({
  apiKeyHeader: "",
  apiKeyQuery: ""
});

.then(data => {
  console.log(data);
});

Description

Real-time rail prediction methods.

Actions

547636a6f918230da8553640

Description

Returns next train arrival information for one or more stations. Will return an empty set of results when no predictions are available. Use All for the StationCodes parameter to return predictions for all stations.

For terminal stations (e.g.: Greenbelt, Shady Grove, etc.), predictions may be displayed twice.

Some stations have two platforms (e.g.: Gallery Place, Fort Totten, L'Enfant Plaza, and Metro Center). To retrieve complete predictions for these stations, be sure to pass in both StationCodes.

For trains with no passengers, the DestinationName will be No Passenger.

Next train arrival information is refreshed once every 20 to 30 seconds approximately.

Response Elements

Element Description
Trains Array containing train prediction information (AIMPredictionTrainInfo).
Car Number of cars on a train, usually 6 or 8, but might also return - or NULL.
Destination Abbreviated version of the final destination for a train. This is similar to what is displayed on the signs at stations.
DestinationCode Destination station code. Can be NULL. Use this value in other rail-related APIs to retrieve data about a station.
DestinationName When DestinationCode is populated, this is the full name of the destination station, as shown on the WMATA website.
Group Denotes the track this train is on, but does not necessarily equate to Track 1 or Track 2. With the exception of terminal stations, predictions at the same station with different Group values refer to trains on different tracks.
Line Two-letter abbreviation for the line (e.g.: RD, BL, YL, OR, GR, or SV). May also be blank or No for trains with no passengers.
LocationCode Station code for where the train is arriving. Useful when passing in All as the StationCodes parameter. Use this value in other rail-related APIs to retrieve data about a station.
LocationName Full name of the station where the train is arriving. Useful when passing in All as the StationCodes parameter.
Min Minutes until arrival. Can be a numeric value, ARR (arriving), BRD (boarding), ---, or empty.

wmata_rail_realtime.547636a6f918230da8553640({
  "StationCodes": ""
}, context)

Input

  • input object
    • StationCodes required string (values: B03, All): Comma-separated list of station codes. For all predictions, use "All".

Output

Output schema unknown

547636a6f918230da855363f

Description

Returns next train arrival information for one or more stations. Will return an empty set of results when no predictions are available. Use All for the StationCodes parameter to return predictions for all stations.

For terminal stations (e.g.: Greenbelt, Shady Grove, etc.), predictions may be displayed twice.

Some stations have two platforms (e.g.: Gallery Place, Fort Totten, L'Enfant Plaza, and Metro Center). To retrieve complete predictions for these stations, be sure to pass in both StationCodes.

For trains with no passengers, the DestinationName will be No Passenger.

Next train arrival information is refreshed once every 20 to 30 seconds approximately.

Response Elements

Element Description
Trains Array containing train prediction information (AIMPredictionTrainInfo).
Car Number of cars on a train, usually 6 or 8, but might also return - or NULL.
Destination Abbreviated version of the final destination for a train. This is similar to what is displayed on the signs at stations.
DestinationCode Destination station code. Can be NULL. Use this value in other rail-related APIs to retrieve data about a station.
DestinationName When DestinationCode is populated, this is the full name of the destination station, as shown on the WMATA website.
Group Denotes the track this train is on, but does not necessarily equate to Track 1 or Track 2. With the exception of terminal stations, predictions at the same station with different Group values refer to trains on different tracks.
Line Two-letter abbreviation for the line (e.g.: RD, BL, YL, OR, GR, or SV). May also be blank or No for trains with no passengers.
LocationCode Station code for where the train is arriving. Useful when passing in All as the StationCodes parameter. Use this value in other rail-related APIs to retrieve data about a station.
LocationName Full name of the station where the train is arriving. Useful when passing in All as the StationCodes parameter.
Min Minutes until arrival. Can be a numeric value, ARR (arriving), BRD (boarding), ---, or empty.

wmata_rail_realtime.547636a6f918230da855363f({
  "StationCodes": ""
}, context)

Input

  • input object
    • StationCodes required string (values: B03, All): Comma-separated list of station codes. For all predictions, use "All".

Output

Output schema unknown

Definitions

This integration has no definitions