Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nwbapi

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nwbapi

an API for the German traffic enterprise Nordwest Bahn

  • 0.0.2-beta
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Nordwestbahn API

This is an API of the German traffic enterprise NordWestBahn based in Osnabrück. The NWB train lines in the north western of Germany. So, this API Description will be in German.

Das ist eine API der NordWestBahn aus Osnabrück. Die NWB betreibt Bahnlinien im nordwesten Deutschlands, diese Implementierung greif auf die Webseite der NWB zurück. Es besteht keine Verbindung mit der NordWestBahn.

Installation

Node.js wird ab Version 0.10.x vorausgesetzt. Frühere Versionen können auch funktionieren, sind jedoch nicht getestet.

Zur Installation: npm install nwbapi

API

Die API ist mit Promisses umgesetzt. Für Details, schaue bitte auf der GitHub-Seite des Projekte Q nach.

nwbapi.stationId(stationName)

Liefert ein Array mit Betriebsstellen zurück. Die Betriebsstellen-ID wird benötigt um eine Abfrage gegen die nwb.timetable(stationId) zu machen.

Beispiel:

nwb.stationId('Kleve')
.then( function (stationIds) {
  console.log(stationIds);
  /*
    logs: [ { id: 'KKLV', bezeichnung: 'Kleve' } ]
  */
});

nwbapi.timetable(stationId)

Liefert ein Array mit Abfahrten zurück. Die stationId kann mit nwb.stationId(stationName) geholt werden.

Beispiel:

nwb.timetable('KKLV')
.then( function (timetable) {
  console.log(timetable);
  /*
    logs: 
    [ { std: '22:19',
        etd: '',
        train: { id: '75077', line: 'RE10', name: 'Niers-Express' },
        direction: 'Düsseldorf Hbf',
        info: 'Keine Echtzeitinformationen vorhanden' } ]
})

Keywords

FAQs

Package last updated on 12 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc