1.0.1 • Published 7 years ago
folijs v1.0.1
Föli.js
Node.js wrapper for Föli api - http://data.foli.fi
Install
npm install folijs
sm(stop, format)
SIRI - Stop monitoring http://data.foli.fi/doc/siri/v0/sm
Param | Type | Description |
---|---|---|
stop | string | Stop identifier eg. 'T1' |
format | 'pretty' | 'format' | 'xml' | Output format |
Example:
// Get all stops
foli.sm().then(function(data) {
console.log(data['T1']);
});
// Get information about single stop
foli.sm('T1').then(function(data) {
console.log(data);
});
vm(format)
SIRI - Vehicle monitoring http://data.foli.fi/doc/siri/v0/vm
Param | Type | Description |
---|---|---|
format | 'pretty' | 'format' | 'xml' | Output format |
Example:
// Get vehicle monitoring information
foli.vm().then(function(data) {
console.log(data);
});
gtfs
TSJL - GTFS http://data.foli.fi/doc/gtfs/v0/index
- agency
- calendar
- calendarDates
- routes
- stops
- stopTimes
- shapes
- trips
Example:
// Get all stops
foli.gtfs.stops().then(function(data) {
console.log(data);
});