JavaScript client for the Montenegrin 🇲🇪 ŽPCG railway API. Complies with the friendly public transport format. Inofficial, using ŽPCG endpoints. Ask them for permission before using this module in production.
npm install --save zpcg
const zpcg = require('zpcg')
This package contains data in the Friendly Public Transport Format and provides the following methods:
stations()
to get a list of operated stations, such asPodgorica
,Bar
orBelgrade
.journeys(origin, destination, date = new Date())
to get routes between stations. Please note that the API doesn't yet support interchange connections.journeyLeg(legId, departureDate)
to get all passed stations and prices for a given journey leg.
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.