<commit_before># autopilot

A Node.js wrapper for [Autopilot](https://autopilothq.com/)'s [REST API](http://docs.autopilot.apiary.io/).

Example:

	var Autopilot = require('autopilot');
	var autopilot = new Autopilot('<KEY>');

	var contact = { FirstName: 'Slarty', LastName: 'Bartfast', Email: '<EMAIL>' };

	autopilot.contacts.upsert(contact, function (err, response) {
		if (err) {
			return console.error('Error', err);
		}

		console.log(response);
	});

### Quick links:
* [Installation](#installation)
* [API Reference](#api-reference)
	* [Contacts](#contacts)
		* [Upsert Contact](#upsert-contact)
		* [Get Contact](#get-contact)
		* [Delete Contact](#delete-contact)
		* [Unsubscribe Contact](#unsubscribe-contact)
	* [Lists](#lists)
		* [List Lists](#list-lists)
		* [Insert List](#insert-list)
		* [List Contacts in List](#list-contacts-in-list)
		* [Check if Contact is in List](#check-if-contact-is-in-list)
		* [Add Contact to List](#add-contact-to-list)
		* [Remove Contact from List](#remove-contact-from-list)
	* [Journeys](#journeys) (via triggers)
		* [Add Contact to Journey](#add-contact-to-journey)
		* [List Journeys with Triggers](#list-journeys-with-triggers)
	* [Account](#account)
		* [Get Account](#get-account)
* [License](#license)

## Installation

	npm install autopilot --save

## API Reference

Begin by initializing with your API key:

	var Autopilot = require('autopilot');
	var autopilot = new Autopilot('c5359558cf764d17bc49f13a87e8a56e');

Now you will be able to interact with system resources as described below.

### Contacts

#### Upsert Contact

* Method: `autopilot.contacts.upsert`
* Parameters:

	| Name      | Type     | Required | Description                                         |
	|-----------|----------|----------|-----------------------------------------------------|
	| contact   | object   | Yes      | The contact data to be upserted.                    |
	| callback  | function | No       | A callback function to be executed upon completion. |
* Example:

		var contact = { FirstName: 'Slarty', LastName: 'Bartfast', Email: '<EMAIL>' };

		autopilot.contacts.upsert(contact, function (err, response) {
			if (err) {
				return console.error('Error', err);
			}

			console.log(response);
		});

#### Get Contact

*Not yet impemented.*

#### Delete Contact

*Not yet impemented.*

#### Unsubscribe Contact

*Not yet impemented.*

### Lists

#### List Lists

*Not yet impemented.*

#### Insert List

*Not yet impemented.*

#### List Contacts in List

*Not yet impemented.*

#### Check if Contact is in List

*Not yet impemented.*

#### Add Contact to List

*Not yet impemented.*

#### Remove Contact from List

*Not yet impemented.*

### Journeys (via triggers)

#### Add Contact to Journey

*Not yet impemented.*

#### List Journeys with Triggers

*Not yet impemented.*

### Account

#### Get Account

*Not yet impemented.*

## License

Released under [MIT](https://github.com/Torchlite/autopilot/blob/master/LICENSE.md).
<commit_msg>Add a notice that this library is unsuitable for use at this point.<commit_after>_**Notice:** This library is in active development and is not yet ready for use._

# autopilot

A Node.js wrapper for [Autopilot](https://autopilothq.com/)'s [REST API](http://docs.autopilot.apiary.io/).

Example:

	var Autopilot = require('autopilot');
	var autopilot = new Autopilot('c5359558cf764d17bc49f13a87e8a56e');

	var contact = { FirstName: 'Slarty', LastName: 'Bartfast', Email: '<EMAIL>' };

	autopilot.contacts.upsert(contact, function (err, response) {
		if (err) {
			return console.error('Error', err);
		}

		console.log(response);
	});

### Quick links:
* [Installation](#installation)
* [API Reference](#api-reference)
	* [Contacts](#contacts)
		* [Upsert Contact](#upsert-contact)
		* [Get Contact](#get-contact)
		* [Delete Contact](#delete-contact)
		* [Unsubscribe Contact](#unsubscribe-contact)
	* [Lists](#lists)
		* [List Lists](#list-lists)
		* [Insert List](#insert-list)
		* [List Contacts in List](#list-contacts-in-list)
		* [Check if Contact is in List](#check-if-contact-is-in-list)
		* [Add Contact to List](#add-contact-to-list)
		* [Remove Contact from List](#remove-contact-from-list)
	* [Journeys](#journeys) (via triggers)
		* [Add Contact to Journey](#add-contact-to-journey)
		* [List Journeys with Triggers](#list-journeys-with-triggers)
	* [Account](#account)
		* [Get Account](#get-account)
* [License](#license)

## Installation

	npm install autopilot --save

## API Reference

Begin by initializing with your API key:

	var Autopilot = require('autopilot');
	var autopilot = new Autopilot('c5359558cf764d17bc49f13a87e8a56e');

Now you will be able to interact with system resources as described below.

### Contacts

#### Upsert Contact

* Method: `autopilot.contacts.upsert`
* Parameters:

	| Name      | Type     | Required | Description                                         |
	|-----------|----------|----------|-----------------------------------------------------|
	| contact   | object   | Yes      | The contact data to be upserted.                    |
	| callback  | function | No       | A callback function to be executed upon completion. |
* Example:

		var contact = { FirstName: 'Slarty', LastName: 'Bartfast', Email: '<EMAIL>' };

		autopilot.contacts.upsert(contact, function (err, response) {
			if (err) {
				return console.error('Error', err);
			}

			console.log(response);
		});

#### Get Contact

*Not yet impemented.*

#### Delete Contact

*Not yet impemented.*

#### Unsubscribe Contact

*Not yet impemented.*

### Lists

#### List Lists

*Not yet impemented.*

#### Insert List

*Not yet impemented.*

#### List Contacts in List

*Not yet impemented.*

#### Check if Contact is in List

*Not yet impemented.*

#### Add Contact to List

*Not yet impemented.*

#### Remove Contact from List

*Not yet impemented.*

### Journeys (via triggers)

#### Add Contact to Journey

*Not yet impemented.*

#### List Journeys with Triggers

*Not yet impemented.*

### Account

#### Get Account

*Not yet impemented.*

## License

Released under [MIT](https://github.com/Torchlite/autopilot/blob/master/LICENSE.md).

{'fraction_non_alphanumeric': 0.1752761533463288, 'fraction_numerical': 0.01023391812865497, 'mean_word_length': 3.3359154929577466, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3559622', 'n_tokens_mistral': 2165, 'n_tokens_neox': 1959, 'n_words': 531}