<commit_before># Ascentis Client Library

A node library for consuming Ascentis Web APIs.

[![Build Status](https://travis-ci.org/PlayNetwork/node-ascentis.png?branch=develop)](https://travis-ci.org/PlayNetwork/node-ascentis) [![Coverage Status](https://coveralls.io/repos/PlayNetwork/node-ascentis/badge.png?branch=develop)](https://coveralls.io/r/PlayNetwork/node-ascentis?branch=develop)

## Features



## Install

```Bash
npm install ascentis
```

## Usage

Ascentis Web API documentation: <http://www.ascentis.com/api/Documentation.asp>

```Javascript
var ascentis = require('ascentis');

// initialize an API client
var client = ascentis.initialize({
  account : 'company',
  clientKey : 'clientKey',
  host : 'selfservice2.ascentis.com',
  secretKey : 'secretKey'
});

// make API calls
ascentis.getEmployees(function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

### Authentication

<http://www.ascentis.com/api/authentication.asp>

Authentication is handled automatically for each API call provided that you supply the appropriate client key and secret key values.

### Find Employees

<http://www.ascentis.com/api/finder.asp>

```Javascript
ascentis.getEmployees(function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

If you would like to search for a specific employee, simply provide the search criteria when calling the method:

```Javascript
var criteria = {
  firstname : 'Broseph',
  lastname : 'McGee'
};

ascentis.getEmployees(criteria, function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

### Attach Files to Employee

<http://www.ascentis.com/api/attachments.asp>

### Retrieve Benefit Plan Enrollment Information

<http://www.ascentis.com/api/benefitsenrollment.asp>

### Find Benefit Plan ID

<http://www.ascentis.com/api/FindPlan.asp>

### Access User Defined Employee Fields

<http://www.ascentis.com/api/custom.asp>

```Javascript
ascentis.getFields(function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

### Work With Compensation Data

<http://www.ascentis.com/api/compensation.asp>

### Work With Existing Employee

<http://www.ascentis.com/api/employee.asp>

### Retrieve Employee Benefits

<http://www.ascentis.com/api/employeebenefits.asp>

### Retrieve Job Information for Employee

<http://www.ascentis.com/api/job.asp>

### Create New Hire

<http://www.ascentis.com/api/newhire.asp>

### Retrieve Direct Deposit Information for Employee

<http://www.ascentis.com/api/directdep.asp>

### Retrieve HR Change Log

<http://www.ascentis.com/api/changelog.asp>

### Find COBRA Eligible Employees

<http://www.ascentis.com/api/cobra.asp>

```Javascript
var criteria = {
  from : '01/01/2013'
};

ascentis.getCOBRAEligibleEmployees(criteria, function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```<commit_msg>adding documentation for getting changes<commit_after># Ascentis Client Library

A node library for consuming Ascentis Web APIs.

[![Build Status](https://travis-ci.org/PlayNetwork/node-ascentis.png?branch=develop)](https://travis-ci.org/PlayNetwork/node-ascentis) [![Coverage Status](https://coveralls.io/repos/PlayNetwork/node-ascentis/badge.png?branch=develop)](https://coveralls.io/r/PlayNetwork/node-ascentis?branch=develop)

## Features



## Install

```Bash
npm install ascentis
```

## Usage

Ascentis Web API documentation: <http://www.ascentis.com/api/Documentation.asp>

```Javascript
var ascentis = require('ascentis');

// initialize an API client
var client = ascentis.initialize({
  account : 'company',
  clientKey : 'clientKey',
  host : 'selfservice2.ascentis.com',
  secretKey : 'secretKey'
});

// make API calls
ascentis.getEmployees(function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

### Authentication

<http://www.ascentis.com/api/authentication.asp>

Authentication is handled automatically for each API call provided that you supply the appropriate client key and secret key values.

### Find Employees

<http://www.ascentis.com/api/finder.asp>

```Javascript
ascentis.getEmployees(function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

If you would like to search for a specific employee, simply provide the search criteria when calling the method:

```Javascript
var criteria = {
  firstname : 'Broseph',
  lastname : 'McGee'
};

ascentis.getEmployees(criteria, function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

### Attach Files to Employee

<http://www.ascentis.com/api/attachments.asp>

### Retrieve Benefit Plan Enrollment Information

<http://www.ascentis.com/api/benefitsenrollment.asp>

### Find Benefit Plan ID

<http://www.ascentis.com/api/FindPlan.asp>

### Access User Defined Employee Fields

<http://www.ascentis.com/api/custom.asp>

```Javascript
ascentis.getFields(function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

### Work With Compensation Data

<http://www.ascentis.com/api/compensation.asp>

### Work With Existing Employee

<http://www.ascentis.com/api/employee.asp>

### Retrieve Employee Benefits

<http://www.ascentis.com/api/employeebenefits.asp>

### Retrieve Job Information for Employee

<http://www.ascentis.com/api/job.asp>

### Create New Hire

<http://www.ascentis.com/api/newhire.asp>

### Retrieve Direct Deposit Information for Employee

<http://www.ascentis.com/api/directdep.asp>

### Retrieve HR Change Log

<http://www.ascentis.com/api/changelog.asp>

```Javascript
var criteria = {
  from : '01/01/2013'
};

ascentis.getChanges(criteria, function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```

### Find COBRA Eligible Employees

<http://www.ascentis.com/api/cobra.asp>

```Javascript
var criteria = {
  from : '01/01/2013'
};

ascentis.getCOBRAEligibleEmployees(criteria, function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});
```
{'fraction_non_alphanumeric': 0.1552136752136752, 'fraction_numerical': 0.0044444444444444444, 'mean_word_length': 4.127957931638913, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 8, 'lorem ipsum': 0, 'www.': 30, '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': '5055170', 'n_tokens_mistral': 2150, 'n_tokens_neox': 2018, 'n_words': 455}