Last active
December 1, 2017 02:57
-
-
Save dbabbs/8942dffb360a653c261384a7c1c84e3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.post('/sms', (req, res) => { | |
const twiml = new MessagingResponse(); | |
var incoming = req.body.Body; | |
if (incoming.length > 1) { | |
request.get(geocodeURL, (error, response, body) => { | |
//geocode request | |
request.get(placesURL, (error, response, body) => { | |
//Places request | |
//send first message to user | |
}); | |
}); | |
} else if (places.length > 0 && incoming.length == 1) { //reply | |
//send second message to user | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment