icedata
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

ICEdata

A simple library to fetch the data from German highspeed trains ICE

Note: This only works from the WiFi onboard the ICEs (often called "WIFIonICE" or "WIFI@DB")

Installation

  • npm: npm install icedata
  • yarn: yarn add icedata

Usage

const ice = require("icedata");

ice.fetchAll();

// returns something like this:
let result = {
  connection: true,
  serviceLevel: "AVAILABLE_SERVICE",
  gpsStatus: "LAST_KNOWN_POSITION",
  internet: "HIGH",
  latitude: 51.312399666666664,
  longitude: 9.446855,
  tileY: 145,
  tileX: -11,
  series: "803",
  serverTime: 1628798106501,
  speed: 53,
  trainType: "ICE",
  tzn: "Tz103",
  wagonClass: "SECOND",
  connectivity: {
    currentState: "HIGH",
    nextState: "UNSTABLE",
    remainingTimeSeconds: 637,
  },
  bapInstalled: true,
};

Package Sidebar

Install

npm i icedata

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

2.74 kB

Total Files

7

Last publish

Collaborators

  • dmho