This package has been deprecated

Author message:

This package has been incorporated into right-track-core

right-track-transit

1.3.0 • Public • Published

Right Track Transit Agency (Abstract)

node module: right-track-transit
GitHub repo: right-track/right-track-transit


This is an abstract Right Track Transit Agency. This module provides the abstract RightTrackTransitAgency class which is extended by an implementing Right Track Transit Agency.

This module also includes the Transit Feed Classes: TransitFeed, TransitDivision, and TransitEvent, which are all required when a Transit Agency implements the real-time Transit Feed functionality.

Documentation

Documentation can be found in the /doc/ directory of this repository or online at https://docs.righttrack.io/right-track-transit.

Supported Agencies

The following are Right Track Transit Agencies that implement this abstract class:

Transit Feed

A Transit Feed provides a list of real-time transit events. A Transit Feed is broken down into a hierarchical system where a single Transit Feed includes one or more Divisions, which in turn includes either one or more child Divisions or a list of Events (which contain the real-time transit status information).

To load an agency-specific TransitFeed, use the loadFeed(callback) function where:

  • callback is a callback function: function(err, feed)
    • accepting an Error and TransitFeed as arguments.

See the Documentation for more information on the structure of a TransitFeed.

Example

The following example uses the right-track-transit-mta module to build a Transit Feed for the Metropolitan Transportation Authority.

const mta = require('right-track-transit-mta');

mta.loadFeed(function(err, feed) {
  if ( !err ) {
    console.log(JSON.stringify(feed, null, 2));
  }
});

Readme

Keywords

none

Package Sidebar

Install

npm i right-track-transit

Weekly Downloads

3

Version

1.3.0

License

MIT

Unpacked Size

139 kB

Total Files

27

Last publish

Collaborators

  • dwaring87