API for Bustracker to run on AWS Lambda
These are designed to be used as helper functions for the AWS Lex Bot
Given a stop number returns the ETAs of the next buses coming to that stop. It expects a sinlge number passes as 'stop_number' or a Lex fulfiment request with a slot for:
- stop
Given an address or intersection it will attempt to reverse geolocate the address and return stops with 1 mile of the location It expects a single integer passed as 'address' or a Lex fulfilment request with a slot defined for one of:
- streets
- raw_address
- address
Responds for fulfilment requests from Lex for other intents and provides responses depending on the intent
Expects a query parameter passed as a POST request. This query is handed to Lex and the function returns the respinse from Lex.