<commit_before>node-transifex
=====================

[Transifex](http://www.transifex.com) API client for nodejs

Install the node.js module using npm:

`$ npm install transifex`


Initialize the app with the `init()` with your credential and project name for the first time

``` javascript
var transifex = require("transifex");

transifex.init({
	project_slug: "projectName",
	credential: "user:pass" // In the same format
});
```

## API
The module exposes a number of useful functions, including:

### Project API

#### projectSetMethods

The `getAllTXprojects` function returns a list of (slug, name, description, source_language_code) for all projects the user has access to in JSON format. This method supports pagination through the options start and end.

``` javascript
transifex.projectSetMethods(options, function(err, data) {
  ...
});
```

Return all the projects in Transifex

or

``` javascript
transifex.projectSetMethods({ start: 1, end: 20 }, function(err, data) {
  ...
});
```

Return only the first 20 projects from the list.

#### projectInstanceMethods

The `getAllTXprojects` function returns the fields slug, name, description and source_language_code for the project of the specified slug in JSON format includes the above fields as well as the following ones:

* long_description
* homepage
* feed
* created
* anyone_submit
* bug_tracker
* trans_instructions
* a list of tags
* outsource
* auto_join
* a list of the maintainers' username
* the username of the owner of the project
* a list of the resources of the project containing the fields slug and name.
* a list of language codes for the teams created for the project.
* fill_up_resources, a boolean to specify whether the system will fill up

``` javascript
transifex.projectInstanceMethods("transifex", function(err, data) {
  ...
});
```

### Resource API

#### resourcesSetMethod
<commit_msg>Fix typo in the doc<commit_after>node-transifex
=====================

[Transifex](http://www.transifex.com) API client for nodejs

Install the node.js module using npm:

`$ npm install transifex`


Initialize the app with the `init()` with your credential and project name for the first time

``` javascript
var transifex = require("transifex");

transifex.init({
	project_slug: "projectName",
	credential: "user:pass" // In the same format
});
```

## API
The module exposes a number of useful functions, including:

### Project API

#### projectSetMethods

The `projectSetMethods` function returns a list of (slug, name, description, source_language_code) for all projects the user has access to in JSON format. This method supports pagination through the options start and end.

``` javascript
transifex.projectSetMethods(options, function(err, data) {
  ...
});
```

Return all the projects in Transifex

or

``` javascript
transifex.projectSetMethods({ start: 1, end: 20 }, function(err, data) {
  ...
});
```

Return only the first 20 projects from the list.

#### projectInstanceMethods

The `projectInstanceMethods` function returns the fields slug, name, description and source_language_code for the project of the specified slug in JSON format includes the above fields as well as the following ones:

* long_description
* homepage
* feed
* created
* anyone_submit
* bug_tracker
* trans_instructions
* a list of tags
* outsource
* auto_join
* a list of the maintainers' username
* the username of the owner of the project
* a list of the resources of the project containing the fields slug and name.
* a list of language codes for the teams created for the project.
* fill_up_resources, a boolean to specify whether the system will fill up

``` javascript
transifex.projectInstanceMethods("transifex", function(err, data) {
  ...
});
```

### Resource API

#### resourcesSetMethod

{'fraction_non_alphanumeric': 0.10129939008220631, 'fraction_numerical': 0.0026518164942985947, 'mean_word_length': 4.848062015503876, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '5650985', 'n_tokens_mistral': 1088, 'n_tokens_neox': 1029, 'n_words': 444}