JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q40984F
  • License MIT

A node package for accessing National Rail DARWIN:PushPort data over STOMP to provide

Package Exports

  • openraildata-darwin

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openraildata-darwin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

openraildata-darwin

GitHub issues npm GitHub license David David sheilds

usage

To use the openraildata-darwin package you first need an account on National Rails data feeds. Once you have an account you can run the examples below:

installation

  1. install npm
  2. npm install openraildata-darwin --save

table of contents

getting started

this package connects with the National Rails DARWIN PushPort server to access real time train alerts and messaging on the UK rail network. All connection and message processing is managed by this package and the results are outputed into JS Object format in the form of an event.

an example for using this package to get train status messages from DARWIN PushPort:

const Darwin = require('openraildata-darwin');

const client = new Darwin();

client.on('trainStatus', (status) => {
  console.log(status);
});

client.connect(queueName);

package docs

Darwin docs

dev notes

Hi :D

this package is being coded while im experimenting so feel free to use it however it may change at any moment. I'm publishing it as i go so not all features will be there.

I'm generaly only working on this while im sat on the train too and from my day job so this may take a while