skiffhack/skiffin

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

Homepage:

Size: 1055

Language: Scala

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Skiffin

Provides who's in and who's out information for The Skiff.

TODO
Running

This is a Lift web app.

$ ./sbt
sbt> container:start

Then http://127.0.0.1:8080/

API v1

All urls prefixed with /api/v1 (apologies to REST purists)

Get a list of everyone
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 a specific person
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 a status change
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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.