discover-vbb-stations

2.0.1 • Public • Published

discover-vbb-stations

Discover VBB stations by querying departures. It tries to find all stations that all trains known by VBB stop at. Analogous to discover-db-stations.

npm version build status ISC-licensed chat on gitter support me on Patreon

Installing

npm install discover-vbb-stations

Usage

using the command line

Using npx:

npx discover-vbb-stations [station-id] >stations.ndjson

using JavaScript

const walk = require('discover-vbb-stations')
 
walk(stationId) // where to start
.on('data', console.log)
.on('error', console.error)

walk() returns a readable stream in object mode. It emits the following events:

API

walk(stationId, [opt])

stationId must be a string and a valid IBNR.

opt may have the following keys. It will be passed into queue().

  • concurrency: number of requests run in parallel – default: 2
  • timeout: timeout for a single job in milliseconds – default: 10000

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i discover-vbb-stations

    Weekly Downloads

    0

    Version

    2.0.1

    License

    ISC

    Unpacked Size

    4.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • derhuerst