# right-track-transit

> Right Track Transit Agency (Abstract)

Latest version **1.3.0** (published 2021-12-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install right-track-transit
pnpm add right-track-transit
yarn add right-track-transit
bun add right-track-transit
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2021-12-03 |
| First published | 2018-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 135.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Waring |
| Maintainers | dwaring87 |

## Links

- npm: https://www.npmjs.com/package/right-track-transit
- Repository: https://github.com/right-track/right-track-transit
- Homepage: https://righttrack.io
- Issues: https://github.com/right-track/right-track-transit/issues
- npm.io page: https://npm.io/package/right-track-transit

## Dependencies (1)

- [@dwaring87/config](https://npm.io/package/@dwaring87/config.md) ^1.3.1

## Recent versions

- 1.3.0 (latest) — 2021-12-03
- 1.1.2 — 2019-03-16
- 1.1.1 — 2018-03-04
- 1.1.0 — 2018-02-22
- 1.0.1 — 2018-02-22
- 1.0.0 — 2018-02-20

## README

Right Track Transit Agency (Abstract)
=====================================

**node module:** [right-track-transit](https://www.npmjs.com/package/right-track-transit)<br />
**GitHub repo:** [right-track/right-track-transit](https://github.com/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](https://docs.righttrack.io/right-track-transit).

### Supported Agencies

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

- [Metropolitan Transportation Authority (mta)](https://github.com/right-track/right-track-transit-mta)
- [NYS Thruway Authority (nysta)](https://github.com/right-track/right-track-transit-nysta)

### 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](https://github.com/right-track/right-track-transit-mta)
module to build a **Transit Feed** for the Metropolitan Transportation Authority.

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

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

---
_Source: https://npm.io/package/right-track-transit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
