<commit_before># fitbit-js

Simple FitBit API client for express + connect.

    npm install fitbit-js

## Usage

fitbit-js has two methods:

```javascript
getAccessToken(req, res, callback) // Uses oAuth module to get the access_token
apiCall(http_method, path, params, callback) // Does a call to the FitBit API.
```

`params` must contain the token.

## Test

Register an App with fitbit and either specify the callbackURI or append it to the command. NB: There may be some issues specifying 127.0.0.1 or localhost as the callbackURI.

    ```cd test
    node test.js [appkey] [appsecret] [callbackURI]```

open [http://localhost:8553](http://localhost:8553)<commit_msg>Add install notes.<commit_after># fitbit-js

Simple FitBit API client for express + connect.

    npm install oauth express serializer
    npm install fitbit-js

## Usage

fitbit-js has two methods:

```javascript
getAccessToken(req, res, callback) // Uses oAuth module to get the access_token
apiCall(http_method, path, params, callback) // Does a call to the FitBit API.
```

`params` must contain the token.

## Test

Register an App with fitbit and either specify the callbackURI or append it to the command. NB: There may be some issues specifying 127.0.0.1 or localhost as the callbackURI.

    ```cd test
    node test.js [appkey] [appsecret] [callbackURI]```

open [http://localhost:8553](http://localhost:8553)
{'fraction_non_alphanumeric': 0.09841954022988506, 'fraction_numerical': 0.020114942528735632, 'mean_word_length': 4.102564102564102, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1805396', 'n_tokens_mistral': 449, 'n_tokens_neox': 408, 'n_words': 172}