node-oc-transpo
v1.0.2
Published
A Node.js library for the OC Transpo API
Downloads
6
Maintainers
Readme
OC Transpo API Library for Node.js
Installation
npm install node-oc-transpo
Example
const octranspo = require("node-oc-transpo");
const secret = {
appID: "",
appKey: ""
};
var oc = new octranspo.OCTranspo(secret);
oc.getRouteSummaryForStop(3000, (err, res) => {
if (err) {
console.log(err);
} else {
console.log(res);
}
});
oc.getNextTripsForStop(3000, 95, (err, res) => {
if (err) {
console.log(err);
} else {
console.log(res);
}
});
oc.getNextTripsForStopAllRoutes(3000, (err, res) => {
if (err) {
console.log(err);
} else {
console.log(res);
}
});