1.0.0 • Published 4 years ago
ualbany-shuttle-bus v1.0.0
UAlbany Shuttle Bus API
This is a package that scrapes UAlbany's Shuttle Bus arrivals.
Installation
npm install ualbany-shuttle-bus
Usage
Using Promises
const Shuttle = require('ualbany-shuttle-bus');
Shuttle.getLiberty()
.then(arrivals => console.log(arrivals))
.catch(err => console.log(err));
Using async/await
// Inside async function
try {
let arrivals = await Shuttle.getFreedom();
console.log(arrivals);
}
catch(err) {
console.log(err);
}
Documentation
There are 12 functions, each for all the bus stops that the shuttles stop at.
getFreedom() : BusArrival
getLiberty() : BusArrival
getCollinsCircle() : BusArrival
getDraperHall() : BusArrival
getAlumniQuad() : BusArrival
getEmpireCommons() : BusArrival
getSocialScience() : BusArrival
getHealthSciences() : BusArrival
getPatroonCreek() : BusArrival
getMSCUAB() : BusArrival
getSEFCUArena() : BusArrival
getGroceryShuttle() : BusArrival
1.0.0
4 years ago