Provides who's in and who's out information for The Skiff.
- Add persistence backend (it's all in memory for now)
- Deploy to Heuroku
- Add a UI
- needs style, name, etc
- change live updating code to send updates via JS to let the browser do all the rendering.
- Think about security - the end points are open to all
- Wire up to 4sq?
- Wire up to RFID and put reading in the door
- Add location (WERKS or SKIFF)
This is a Lift web app.
$ ./sbt
sbt> container:start
Then http://127.0.0.1:8080/
All urls prefixed with /api/v1
(apologies to REST purists)
GET /api/vi/people
E.g.,
curl -v -X GET -H 'Content-type: text/json' http://127.0.0.1:8080/api/v1/people
Returns:
{
"count":2,
"people":
[ { "email":"[email protected]",
"in":true,
"when":1326562010157
},
{ … }
]
}
The {email:string,in:bool,when:utc}
JSON is referred to as the "person representation" below.
GET /api/v1/{email}
E.g.,
curl -v -X GET -H 'Content-type: text/json' http://127.0.0.1:8080/api/v1/[email protected]
Returns the person representation shown above or 404 if the person is not known.
POST /api/v1/{email} with data of {"in": true or false}
E.g.,
curl -v -X POST -d '{ "in" : true }' -H 'Content-type: text/json' http://127.0.0.1:8080/api/v1/[email protected]
Returns the person representation, creating the person if they don't already exist.