This package has been deprecated

Author message:

Use hafas-departures-in-direction instead.

vbb-departures-in-direction

0.2.0 • Public • Published

vbb-departures-in-direction

Get departures at a VBB station in a certain direction. Uses vbb-hafas.

npm version build status ISC-licensed chat on gitter

Installing

npm install vbb-departures-in-direction

Usage

Specify the direction as the next station after the one you're querying departures for. depsInDirection will then query departures, advancing the time until it found enough results or sent enough requests.

const depsInDirection = require('vbb-departures-in-direction')

const friedrichstr = '900000100001' // where to get departures
const brandenburgerTor = '900000100025' // direction

depsInDirection(friedrichstr, brandenburgerTor)
.then(console.log)
.catch(console.error)

API

depsInDirection(station, direction, [opt])

opt overrides the following defaults:

{
	concurrency: 4, // max nr. of parallel requests
	results: 10, // nr. of results to collect
	maxQueries: 10 // max nr. of requests
}

Contributing

If you have a question or have difficulties using vbb-departures-in-direction, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

Package Sidebar

Install

npm i vbb-departures-in-direction

Weekly Downloads

1

Version

0.2.0

License

ISC

Last publish

Collaborators

  • derhuerst