Skip to content

derhuerst/digital-im-regio-portal-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

digital-im-regio-portal-client

Query information from the Digital im Regio portal in German Regio trains.

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

Installation

npm install digital-im-regio-portal-client

Usage

const fetchStatus = require('digital-im-regio-portal-client')

fetchStatus()
.then(console.log)
.catch((err) => {
	console.error(err)
	process.exit(1)
})
{
  type: 'RE',
  number: '93109',
  name: 'RE 3',
  tickermessage: null,
  speed: 32.461,
  nextStopovers: [ {
    stop: {
      type: 'stop',
      id: '8010338',
      name: 'Stralsund Hbf',
      ds100: 'WSR',
      location: { latitude: 54.308626, longitude: 13.077321 }
    },
    arrival: null,
    arrivalPlatform: 2,
    departure: null,
    departurePlatform: 2,
    status: '',
    message: '',
    distanceToNext: 14.58,
    arrivalDelay: 0,
    departureDelay: 0
  },
  // …
  {
    stop: {
      type: 'stop',
      id: '8013470',
      name: 'Bernau(b Berlin)',
      ds100: 'BBRN',
      location: { latitude: 52.675569, longitude: 13.592641 }
    },
    arrival: null,
    arrivalPlatform: 5,
    departure: null,
    departurePlatform: 5,
    status: '',
    message: '',
    distanceToNext: null,
    arrivalDelay: 180,
    departureDelay: 180
  } ],
  position: { latitude: 52.80088, longitude: 13.736525 },
  carriageUtilization: { bikes: 0, passengers: 0 },
  carriageCapacity: { passengers: 93, bikes: 12 },
  simCards: [ {
    sim: '89492018167014765317',
    type: 'lte',
    signal: -111,
    provider: 'Vodafone D2'
  } ]
}

Contributing

If you have a question or need support using digital-im-regio-portal-client, 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.