Awesome
ecolines
JavaScript client for the Ecolines API. Complies with the friendly public transport format. Inofficial, using endpoints by Ecolines. Ask them for permission before using this module in production.
Things still missing:
Installing
npm install @juliuste/ecolines
Usage
const ecolines = require('@juliuste/ecolines')
This package contains data in the Friendly Public Transport Format and provides the following methods:
stations()
to get a list of operated stations, such asRiga (bus station)
,Berlin
orWarsaw 01 (Zachodnia)
.regions()
to get a list of all operated regions (cities) such asRiga
,Berlin
orWarsaw
.stopovers(station, opt = {})
to get a list of stopovers (departures / arrivals) at a given station (at a given date).journeys(origin, destination, opt = {})
to get a list of journeys between given origin and destination.legDetails(legId)
to get details (such as stopovers) for a given journey leg discovered using thejourneys
method.currencies()
to get a list of supported ISO-4217 currency codes such asEUR
orPLN
.
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.