Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

juliuste/db-flix-cities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

db-meinferbus-cities

Get all DB stations located in the same german city as the given Flix (Flixbus/Flixtrain) station or region, and vice versa.

npm version Build Status Greenkeeper badge dependency status license fptf version chat on gitter

Installation

npm install db-flix-cities

Usage

Only works for german cities/stations at the moment, other (neighbouring) european countries will hopefully be supported at some point in the future, though.

const adapter = require('db-flix-cities')

This package contains data in the Friendly Public Transport Format.

  • toDB(flixRegionOrStation) to get all DB stations for a given Flix station or region
  • toFlix(dbStation) to get all Flix stations for a given DB station
  • toFlixRegions(dbStation) to get all Flix regions for a given DB station
const adapter = require('db-flix-cities')

adapter.toDB({type: 'region', id: '88'}).then() // list of db station objects for flix region Berlin
adapter.toDB({type: 'station', id: '89'}).then() // list of db station objects for flix station Bremen
adapter.toDB('89').then() // will be interpreted as {type: 'station', id: '89'}

adapter.toFlix({type: 'station', id: '8012666'}).then() // list of flix station objects for Potsdam Hbf
adapter.toFlix('8012666').then() // will be interpreted as {type: 'station', id: '8012666'}
adapter.toFlixRegions('8002045').then() // list of flix region objects for Frankfurt(-Eschersheim)

Similar Projects

Contributing

If you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit the issues page.

About

UNMAINTAINED AND PROBABLY NOT WORKING ANYMORE. Adapter between DB stations and Flix (Flixbus/Flixtrain) cities/stations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published