<commit_before>nforce
======

[![Build Status](https://secure.travis-ci.org/kevinohara80/nforce.png)](http://travis-ci.org/kevinohara80/nforce)  

**nforce** is node.js a REST API wrapper for force.com, database.com, and salesforce.com.

## Features

* Simple api
* Helper oauth methods
* Express middleware
* Streaming queries

## Installation

```bash
$ npm install nforce
```

## Usage

Require **nforce** in your app and create a connection to an org.

```js
var nforce = require('nforce');

var org = nforce.createConnection({
  clientId: 'SOME_OAUTH_CLIENT_ID',
  clientSecret: 'SOME_OAUTH_CLIENT_SECRET',
  redirectUri: 'http://localhost:3000/oauth/_callback',
  apiVersion: 'v24.0',  // optional, defaults to v24.0
  environment: 'production'  // optional, sandbox or production, production default
});
```

Now we just need to authenticate and get our OAuth credentials. Here is one way...

```js
var oauth;

org.authenticate({ username: '<EMAIL>', password: '<PASSWORD>'}, function(err, resp){
  if(!err) oauth = resp;
});
```<commit_msg>small readme tweak<commit_after>nforce
======

[![Build Status](https://secure.travis-ci.org/kevinohara80/nforce.png)](http://travis-ci.org/kevinohara80/nforce)  

**nforce** is node.js a REST API wrapper for force.com, database.com, and salesforce.com.

## Features

* Simple api
* Helper oauth methods
* Express middleware
* Streaming queries

## Installation

```bash
$ npm install nforce
```

## Usage

Require **nforce** in your app and create a connection to an org.

```js
var nforce = require('nforce');

var org = nforce.createConnection({
  clientId: 'SOME_OAUTH_CLIENT_ID',
  clientSecret: 'SOME_OAUTH_CLIENT_SECRET',
  redirectUri: 'http://localhost:3000/oauth/_callback',
  apiVersion: 'v27.0',  // optional, defaults to current version
  environment: 'production'  // optional, sandbox or production, production default
});
```

Now we just need to authenticate and get our OAuth credentials. Here is one way...

```js
var oauth;

org.authenticate({ username: '<EMAIL>', password: '<PASSWORD>'}, function(err, resp){
  if(!err) oauth = resp;
});
```
{'fraction_non_alphanumeric': 0.15016579819990525, 'fraction_numerical': 0.011842728564661297, 'mean_word_length': 4.786301369863014, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1388049', 'n_tokens_mistral': 732, 'n_tokens_neox': 699, 'n_words': 199}