Authenticate and pull from this API to access my real-time personal statistics.
You'll need to sign in, give me your Twitter username and get a token in order to call the functions here (poor man's piggyback-off-someone-else authentication™). I won't do any magic with your account, I just aim to keep track of access statistics.
Sign in with Twitter to get your access token.
Right. Pop your access token ('boofar'
) into the request like so:
http://api.naveen.com/v0/sleep?at=boofar
/v0/sleep - my sleeps (and sometimes naps)
[
{
"start_date": "2013-05-27T22:52:56",
"end_date": "2013-05-28T08:15:00",
"id": "51a41c08b80df90002da515a"
},
{
"note": "an early rise",
"start_date": "2013-05-28T21:24:13",
"end_date": "2013-05-29T06:30:00",
"id": "51a558c682def70002a7f3b2"
},
{
"start_date": "2013-05-29T00:49:44",
"end_date": "2013-05-29T07:30:00",
"id": "51a58912a14df6000216dd5d"
},
...
]
/v0/weight - my weight (in kg)
[
{
"value": 67.25,
"date": "2013-04-29T13:56:34",
"id": "5180330a36ee3f0009088027"
},
{
"value": 67.5,
"date": "2013-04-28T19:02:01",
"id": "5180330a36ee3f0009088028"
},
{
"note": "a slight move of that needle",
"value": 66.45,
"date": "2013-04-23T13:36:58",
"id": "5180330a36ee3f0009088029"
},
...
]
/v0/steps - my feet (with and without shoes)
[
{
"date": "2013-04-23T04:00:00",
"id": "5180340036ee3f000c088027",
"value": 3726
},
{
"date": "2013-04-22T04:00:00",
"id": "5180b68e36ee3f0014088027",
"value": 13819
},
{
"date": "2013-04-21T04:00:00",
"id": "5180b69a36ee3f0019088027",
"value": 5834
},
...
]
/v0/fuel - my activity (as measured by fuel points)
[
{
"date": "2013-04-23T04:00:00",
"id": "5180340036ee3f000c088028",
"value": 1264
},
{
"date": "2013-04-22T04:00:00",
"id": "5180b68e36ee3f0014088028",
"value": 5218
},
{
"date": "2013-04-21T04:00:00",
"id": "5180b69a36ee3f0019088028",
"value": 3004
},
...
]
/v0/places - my checkins (me, outside)
[
{
"placeid": "4c7d4f1b8da18cfa1afc9ece",
"longitude": -73.99739904226263,
"latitude": 40.72178993485349,
"place": "Osteria Morini",
"date": "2013-05-29T21:25:54",
"id": "51a6aaa2498e95a70f71f3a7"
},
{
"placeid": "4cd1ae08bcab95217f073a15",
"longitude": -73.999254,
"latitude": 40.721602,
"place": "Harney & Sons",
"date": "2013-05-29T16:59:07",
"id": "51a66c1b498edc4aaf818b41"
},
{
"placeid": "4c447cd6dd1f2d7face57ff9",
"longitude": -73.998522,
"latitude": 40.720793,
"place": "Lafayette Espresso Bar + Marketplace",
"date": "2013-05-29T12:23:04",
"id": "51a62b68498eeb3d36b00f01"
},
...
]
I've put out the functions above as a start. I aim to keep adding to this list with a few more interesting ones as I think of them.
Drop me a note and let me know what else you'd like to see and what you end up doing with this. I'm curious if this could lead to interesting visualizations or mashups and tell me things that I hadn't noticed before.
The data herein have been normalized from various sources: manual capture, nike fuelband, jawbone up, withings, fitbit, foursquare and various apps I've written.
20130528 - naveen