Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from stanzheng/master
Browse files Browse the repository at this point in the history
answer ryans questions on #3
  • Loading branch information
Stanley Zheng committed Nov 4, 2014
2 parents 5fc3ed9 + 5d23a83 commit 1dfad6c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,44 @@
hrt-bus-text-my-bus
===================

STATUS: pre-alpha need more testing
STATUS: pre-alpha need more testing
phone number: 757-913-5000

text to find in realtime when the bus is coming. powered by the hrtb.us api `

TWILIO_ACCOUNT_SID=''; TWILIO_AUTH_TOKEN=''; node app.js

HRT BUS API
How it works
---
This app relies on a Text Message as a Service API called Twilio. Twilio parses text messages it receives on its service and makes a HTTP GET/POST to a third party route service you specific. Then on that response it determines what type of actions it needs to take.

This is using TWIML a twilio XML format for formatting reponse messages. The Node service hits the bus api and formats the XML object that is returned to twilio.


Currently there is a heroku service setup at http://hrtbus.herokuapp.com/msg/8004 that parses and creates messages for twilio to send out.

development
---
To test locally you DO NOT need to set up twilio. You can install the dependencies and test locally what type of reponse messages are formed from the console.

<<<<<<< HEAD
The rest will be handled by the third party service

installation
----
```
git clone http://gitub.com/YOURNAME/hrt-bus-text-my-bus
npm install
node app.js
```

<img src="http://i.imgur.com/UTX2FUu.png" style="width:400px";></img>


HRT BUS API
----
=======
![Imgur](http://i.imgur.com/UTX2FUu.png)


>>>>>>> 5fc3ed9d5d1ff6db6c0672ba0f1eb6408df79978
http://api.hrtb.us/api/
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ app.post('/msg', function (req,res) {
console.log(req.headers);
console.log(req.query);
console.log(req.body);
console.log(req.form);
console.log("form",req.form);
console.log(req.params);
console.log(req.params.Body);
// console.log(req.params.Body);


//TRANSFORM THIS DATA
var busstop = req.body.Body;
Expand Down

0 comments on commit 1dfad6c

Please sign in to comment.