# national-rail-data

> A simple library to retrieve data from the national rail data portal service

Latest version **1.0.1** (published 2019-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install national-rail-data
pnpm add national-rail-data
yarn add national-rail-data
bun add national-rail-data
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-05-18 |
| First published | 2019-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 10.15.3 |
| Dependencies | 4 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Gawn |
| Maintainers | jamesgawn |
| Keywords | national-rail, trains, rail |

## Links

- npm: https://www.npmjs.com/package/national-rail-data
- Repository: https://github.com/jamesgawn/national-rail-data
- Issues: https://github.com/jamesgawn/national-rail-data/issues
- npm.io page: https://npm.io/package/national-rail-data

## Dependencies (4)

- [bunyan](https://npm.io/package/bunyan.md) ^1.8.12
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19
- [request](https://npm.io/package/request.md) ^2.88.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.7

## Recent versions

- 1.0.1 (latest) — 2019-05-18
- 1.0.0 — 2019-05-18

## README

# national-rail-data

[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![CircleCI](https://circleci.com/gh/jamesgawn/national-rail-data.svg?style=svg)](https://circleci.com/gh/jamesgawn/national-rail-data)

## Introduction

A promise based implementation to access the national rail's data soap based APIs.

### Installation

```
npm install national-rail-data
```

### Usage

In order to use this library you will first need to obtain a [National Rail Data Portal](http://opendata.nationalrail.co.uk) account. The credentials are used to initialise this library:

```javascript
const RailData = require('national-rail-data')
let railData = RailData('username', 'password')
``` 

You can then use library to retrieve the station information as follows:

```javascript
let stations = await railData.getStations()
```

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