https://github.com/denolfe/jefit
A third-party API for accessing JeFit data
https://github.com/denolfe/jefit
Last synced: over 1 year ago
JSON representation
A third-party API for accessing JeFit data
- Host: GitHub
- URL: https://github.com/denolfe/jefit
- Owner: denolfe
- Created: 2015-08-05T05:03:56.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-11-13T19:19:41.000Z (over 2 years ago)
- Last Synced: 2025-03-18T23:43:57.351Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 16
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jefit
Third-party API for accessing JeFit data
## Installation
`npm install jefit`
OR
`yarn add jefit`
## Prerequisites
* This client will only work if your privacy (under your settings) is set to: Everyone
* Grab your userId from https://www.jefit.com/my-jefit/, look for https://jefit.com/[USERID] url.
## Usage
`var jefit = require('jefit');`
### jefit.fetchMostRecent(userId, callback)
* userId `String`
* callback `Function`
Example:
```
jefit.fetchMostRecent('111111', function (result) {
console.log(result);
});
```
### jefit.fetchSingleDate(userId, date, callback)
* userId `String`
* date `String` with format `YYYY-MM-DD`
* callback `Function`
Example:
```
jefit.fetchSingleDate('111111', '2014-01-13', function (result) {
console.log(result);
});
```
### Output:
```
{
"exercises": [
{
"sets": [
{
"index": 1,
"duration": 600
}
],
"name": "Elliptical Training",
"oneRepMax": null,
"type": "Cardio"
},
{
"sets": [
{
"index": 1,
"weight": 25,
"reps": 12
},
{
"index": 2,
"weight": 30,
"reps": 12
},
{
"index": 3,
"weight": 35,
"reps": 12
}
],
"name": "Dumbbell Bench Press",
"oneRepMax": 49,
"type": "Lift"
}
],
"date": "2015-08-03",
"sessionLength": 1602,
"actualWorkout": 1062,
"wastedTime": 0,
"restTimer": 540,
"exercisesDone": 2,
"weightLifted": 1080
}
```
## To Do
- Add proper tests