openraildata-darwin
v2.2.1
Published
A node package for accessing National Rail DARWIN:PushPort data over STOMP to provide
Downloads
13
Maintainers
Readme
openraildata-darwin
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
- install npm
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
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