<commit_before># empatica-connect [![Build Status](https://travis-ci.org/danbee/empatica-connect.svg?branch=master)](https://travis-ci.org/danbee/empatica-connect)

A node module for fetching data from Empatica Connect.


## Install

```
$ npm install --save empatica-connect
```


## Usage

```js
var empaticaConnect = require('empatica-connect');

empaticaConnect.getLastSession(deviceId, function (session) {
  // do something with the session data
},
function (error) {
  // something went wrong!
});
```

## API

### empaticaConnect.getLastSession(deviceId, success, failure)

#### deviceId
<commit_msg>Add information about environment vars.<commit_after># empatica-connect [![Build Status](https://travis-ci.org/danbee/empatica-connect.svg?branch=master)](https://travis-ci.org/danbee/empatica-connect)

A node module for fetching data from Empatica Connect.


## Install

```
$ npm install --save empatica-connect
```


## Usage

The username and password for the account should be set up as environment
variables:

```sh
$ export EMPATICA_USERNAME={username}
$ export EMPATICA_PASSWORD={password}
```

`direnv` is a good tool to do this in development.

```js
var empaticaConnect = require('empatica-connect');

empaticaConnect.getLastSession(deviceId, function (session) {
  // do something with the session data
},
function (error) {
  // something went wrong!
});
```

## API

### empaticaConnect.getLastSession(deviceId, success, failure)

#### deviceId

{'fraction_non_alphanumeric': 0.1411042944785276, 'fraction_numerical': 0.0, 'mean_word_length': 5.066115702479339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7262143', 'n_tokens_mistral': 483, 'n_tokens_neox': 465, 'n_words': 117}