Let’s scrape data from our fitness trackers!
Here’s a code sample which reads data from Fitbit.
It uses the terrific Temboo library for interfacing with the Fitbit API:
To use it, you will need both a Fitbit account and a Temboo account.
Furthermore, in order to fetch your Fitbit data with this code, you will need to first use the Fitbit App registration and Temboo OAuth Wizard beforehand to obtain: your Fitbit accessToken, accessTokenSecret, consumerSecret, and consumerKey.
To get data from the Nike Fuelband, you can use this code:
However, in order for that code to work, you will need to obtain your Fuelband’s deviceID and accessToken. Instructions for doing so are adapted from this link. Basically, you will need to use Charles, an HTTP proxy & packet sniffer, in order to obtain those keys: http://www.charlesproxy.com/download/. Here’s the summary for doing so:
Once you have scraped the Fuelband data, you can parse it with this parser: