openraildata-darwin

2.2.1 • Public • Published

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

Package Sidebar

Install

npm i openraildata-darwin

Weekly Downloads

0

Version

2.2.1

License

MIT

Last publish

Collaborators

  • carboncollins