Name: skiffin
Owner: skiffhack
Description: Who's currently in the office
Created: 2012-01-14 18:09:36.0
Updated: 2013-11-03 17:29:34.0
Pushed: 2012-01-15 22:41:53.0
Size: 1055
Language: Scala
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Provides who's in and who's out information for The 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":"richard@dallaway.com",
"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/richard@dallaway.com
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/richard@dallaway.com
Returns the person representation, creating the person if they don't already exist.