https://github.com/robatron/fitbit-activity-csv
Chrome extension to download your Fitbit activity history as a CSV file
https://github.com/robatron/fitbit-activity-csv
Last synced: 10 months ago
JSON representation
Chrome extension to download your Fitbit activity history as a CSV file
- Host: GitHub
- URL: https://github.com/robatron/fitbit-activity-csv
- Owner: robatron
- Created: 2017-03-11T23:38:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-16T01:18:08.000Z (over 9 years ago)
- Last Synced: 2025-01-23T22:17:58.352Z (over 1 year ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fitbit-activity-csv
> Dumb little Chrome extension I wrote for myself to download a specific set of Fitbit activity data as a CSV file
## Usage
Enable this extension, visit https://www.fitbit.com/activities, then open the JavaScript console.
## Configuration
TBD
## Dev Notes
### AJAX API
#### Example Request
##### Request
POST https://www.fitbit.com/ajaxapi
##### Form Data
```
request: {
"serviceCalls": [
{
"id": "GET \/api\/2\/user\/activities\/logs",
"name": "user",
"method": "getActivitiesLogs",
"args": {
"fromDate": "2017-03-16",
"toDate": "2017-03-16",
"period": "day",
"offset": 0,
"limit": 500
}
}
],
"template": "activities\/modules\/models\/ajax.response.json.jsp"
}
csrfToken: 67CBA974-6166-1EC7-C7AA-140633DAC75B
```
#### Example Response
```js
{
"GET \/api\/2\/user\/activities\/logs": {
"status": 200,
"result": [
{
// Interesting fields (to me)
"dateTime": "2017-03-12T14:48:48.000Z",
"formattedDate": "2017-03-12",
"formattedStartTime": "14:48",
"startTimeHours": "14",
"startTimeMinutes": "48",
"distance": "4.5",
"formattedDuration": "49:01",
"durationHours": "",
"durationMinutes": 49,
"durationSeconds": 1,
"steps": 8099,
"calories": 625,
// Other fields
"activityId": 90009,
"activityLogEntryId": 6550778766,
"ampm": "pm",
"canUpdateActivity": false,
"clock": 24,
"date": "2017-03-14", // Request date, *not* activity date
"favoriteId": "",
"formattedDateTime": "Mar 12, 14:48"
"formattedDistance": "4.5 miles",
"generalActivityId": 90009,
"hasDistance": true,
"hasLevels": true,
"hasSpeed": true,
"id": 6550778766,
"intensity": 90009,
"intensityDescription": "",
"isAnnotation": false,
"isDisabled": false,
"isExercise": true,
"isFavorite": false,
"isReadOnly": false,
"manualCalories": 625,
"manualCaloriesEnabled": false,
"name": "Run",
},
...
],
"hasMoreLogs": true,
"isExercise": true,
"earliestLog": "2016-08-17T09:48:44"
}
}
```