<commit_before>## Existing Integrations
Integrations are in the `@datafire` npm namespace. You can view available integrations by
visiting datafire.io/integrations or running
```
datafire list -a
```

To add an integration to your project, run:
```
npm install @datafire/$integration
```

If you'd like to add your API to the DataFire registry, submit a
[pull request](https://github.com/DataFire/Integrations).

## Versioning
DataFire integrations use [semver](http://semver.org/) after version 0.1.0. Specifically:
* PATCH changes will occur for backward-compatible fixes, or documentation changes
* MINOR changes will occur when new functionality is added
* MAJOR changes will occur if breaking changes are made

## Add Integrations by URL
New integrations can be added by the URL of an Open API (Swagger) specification or an RSS feed:
```
datafire integrate --rss https://www.reddit.com/.rss
datafire integrate --openapi https://api.acme.com/openapi.json --name acme
```

This will create the directory `./integrations/$name` with the required information. You can
reference this integration in NodeJS with:

```js
var acme = require('./integrations/acme');
```

### API Specification Formats
You can also specify `--raml`, `--io_docs`, `--wadl`, or `--api_blueprint`, though you'll need to install
api-spec-converter:
```
npm install -g api-spec-converter
datafire integrate --raml https://raw.githubusercontent.com/raml-apis/Bufferapp/master/api.raml
```

# Custom Integrations
You can greate custom integrations using the `datafire.Integration` class.
Here's an example that creates a filesystem integration:

```js
var datafire = require('datafire');
var fs = require('fs');
var Integration = module.exports = new Integration({
  title: "Filesystem",
  description: "Gives read access to the filesystem",
});

Integration.actions.readFile = new datafire.Action({
  inputs: [{
    name: "filename",
    type: "string",
  }],
  handler: input => {
    return new Promise((resolve, reject) => {
      fs.readFile(input.name, (err, contents) => {
        if (err) resolve(err);
        else resolve(contents)
      });
    });
  }
});
```
<commit_msg>Update Integrations.md<commit_after>## Existing Integrations
Integrations are in the `@datafire` npm namespace. You can view available integrations by
visiting datafire.io/integrations or running
```
datafire list -a
```

To add an integration to your project, run:
```
npm install @datafire/$integration
```

If you'd like to add your API to the DataFire registry, submit a
[pull request](https://github.com/DataFire/Integrations).

## Versioning
DataFire integrations use [semver](http://semver.org/) after version 0.1.0. Specifically:
* PATCH changes will occur for backward-compatible fixes, or documentation changes
* MINOR changes will occur when new functionality is added
* MAJOR changes will occur if breaking changes are made

## Add Integrations by URL
New integrations can be added by the URL of an Open API (Swagger) specification or an RSS feed:
```
datafire integrate --rss https://www.reddit.com/.rss
datafire integrate --openapi https://api.acme.com/openapi.json --name acme
```

This will create the directory `./integrations/$name` with the required information. You can
reference this integration in NodeJS with:

```js
var acme = require('./integrations/acme');
```

### API Specification Formats
You can also specify `--raml`, `--io_docs`, `--wadl`, or `--api_blueprint`, though you'll need to install
api-spec-converter:
```
npm install -g api-spec-converter
datafire integrate --raml https://raw.githubusercontent.com/raml-apis/Bufferapp/master/api.raml
```

# Custom Integrations
You can greate custom integrations using the `datafire.Integration` class.
Here's an example that creates a filesystem integration:

```js
var datafire = require('datafire');
var fs = require('fs');
var Integration = module.exports = new Integration({
  title: "Filesystem",
  description: "Gives read access to the filesystem",
});

Integration.actions.readFile = new datafire.Action({
  inputs: [{
    name: "filename",
    type: "string",
  }],
  handler: input => {
    return new Promise((resolve, reject) => {
      fs.readFile(input.name, (err, contents) => {
        if (err) reject(err);
        else resolve(contents)
      });
    });
  }
});
```

{'fraction_non_alphanumeric': 0.12251042149143122, 'fraction_numerical': 0.0013895321908290875, 'mean_word_length': 4.286413708690331, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, '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': '1416663', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1224, 'n_words': 457}