0.1.0 • Published 9 years ago

national-rail-stations v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

National Rail Station Codes

A super simple wrapper for the kinda hidden National Rail station code API. Allows you to search for a station name and brings back an array of matching stations. The station information contains its three letter CRC code(National Rail Enquiries - Station Codes), full name, latitude, longitude, postcode, local operator code and the raw API response.

Installation

npm install national-rail-stations --save

Usage

var stations = require('national-rail-stations'),
    stationName = 'richmond';

stations.search(stationName, function(error, stations) {
    if (!error) {
        stations.forEach(function(station){
            console.log(station.code, station.name);
        });
    }
});

Release History

  • 0.1.0 Initial release