SF Transit is an Alexa skill for the Amazon Echo that provides San Francisco Municipal Transportation Agency (SFMTA, a.k.a. Muni) predictions. By providing the route and stop ID (found on poles, bus shelters, signs), Alexa will call the Next Bus API and return the next predicted arrival in minutes.
SFMTA provides the documentation for NextBus's predictions API here.
Feel free to create a pull request and improve the skill. At some point I might try to add tests that correspond to Amazon's Alexa test documentation. If you're interested in doing that, even better.
To run the app locally, install the needed node packages:
npm install
Then uncomment the lines indicated at the top:
///// UNCOMMENT BELOW TO TEST LOCALLY /////
Comment out the line:
exports.handler = function(event, context, callback) {
As well as its closing brace, the very last };
.
Then run the command:
node index.js
Not authorized, sponsored, or endorsed by the San Francisco Municipal Transportation Agency (SFMTA).