<commit_before># lc-api
A Promise-based Lending Club API for NodeJS

## Disclaimer

This project is currently in development. It's working, but is not yet properly harnessed and documented.

#### TODO before 1.0:
 * Unit test coverage
 * Integration test coverage
 * Full documentation
 
## Example code

This example code will get the entire batch of new listings and
purchase a $25.00 note for each loan that matches our filter.

```
// Include and initialize the lc-api
const LC = require('lc-api');
const lc = new LC(credentials.apiKey, credentials.investorId);

// Get all new loans
lc.loans.getNewListings().then(newLoans => {
  return newLoans
    // Apply filters
    .filter(loan => ['A', 'B', 'C'].indexOf(loan.grade) !== -1)
    // Convert to orders
    .map(loan => loan.createOrder(25.00));
  // Submit orders
}).then(orders => lc.account.submitOrders(orders));
```

## You will need:

#### Your API key

You will find your API key on the bottom of [your account page](https://www.lendingclub.com/account/profile.action)

#### Your account number

You will find your account number right below the Annualized Return box on [your summary page](https://www.lendingclub.com/account/summary.action)

## Installation

```
npm install lc-api
```

## API Documentation

#### Coming Soon
<commit_msg>Fixed JS syntax highlighting in README.md<commit_after># lc-api
A Promise-based Lending Club API for NodeJS

## Disclaimer

This project is currently in development. It's working, but is not yet properly harnessed and documented.

#### TODO before 1.0:
 * Unit test coverage
 * Integration test coverage
 * Full documentation
 
## Example code

This example code will get the entire batch of new listings and
purchase a $25.00 note for each loan that matches our filter.

```javascript
// Include and initialize the lc-api
const LC = require('lc-api');
const lc = new LC(credentials.apiKey, credentials.investorId);

// Get all new loans
lc.loans.getNewListings().then(newLoans => {
  return newLoans
    // Apply filters
    .filter(loan => ['A', 'B', 'C'].indexOf(loan.grade) !== -1)
    // Convert to orders
    .map(loan => loan.createOrder(25.00));
  // Submit orders
}).then(orders => lc.account.submitOrders(orders));
```

## You will need:

#### Your API key

You will find your API key on the bottom of [your account page](https://www.lendingclub.com/account/profile.action)

#### Your account number

You will find your account number right below the Annualized Return box on [your summary page](https://www.lendingclub.com/account/summary.action)

## Installation

```
npm install lc-api
```

## API Documentation

#### Coming Soon

{'fraction_non_alphanumeric': 0.12197885196374622, 'fraction_numerical': 0.008308157099697885, 'mean_word_length': 3.9887005649717513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '4563939', 'n_tokens_mistral': 821, 'n_tokens_neox': 773, 'n_words': 294}