Skip to content

Commit

Permalink
Merge pull request #2 from oronbz/patch-1
Browse files Browse the repository at this point in the history
Clarify few prerequisites and add installation instructions
  • Loading branch information
denolfe authored Dec 18, 2018
2 parents 6a54c1a + 239f581 commit e1de446
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,34 @@ 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: <b>Everyone</b>
* 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`
Expand All @@ -22,7 +46,7 @@ jefit.fetchSingleDate('111111', '2014-01-13', function (result) {
});
```

Output:
### Output:

```
{
Expand Down Expand Up @@ -73,4 +97,4 @@ Output:

## To Do

- Add proper tests
- Add proper tests

0 comments on commit e1de446

Please sign in to comment.