<commit_before># node-tvdb

Node.js library for accessing [TheTVDB API](http://www.thetvdb.com/wiki/index.php/Programmers_API). Refactored for [Televiso](https://televi.so/) from [joaocampinhos/thetvdb-api](https://github.com/joaocampinhos/thetvdb-api) to give nicer output and lots of additional features.

Pull requests are always very welcome.

## Features

- Handle errors from API as JavaScript errors
- Only returns relevant data (no need to call response.Data.Series etc.)
- Set language at initialisation or afterwards when needed
- Normalised keys and values
- Empty values parsed as null
- Updates endpoint grouped by type
- Supports both node callback functions and promises
- [Tests with Mocha and Wercker CI](https://app.wercker.com/#applications/53f155d02094f9781d058f98)

## Installation

Install with [npm](http://npmjs.org/):

```
npm install --save node-tvdb
```

And run tests with [Mocha](http://visionmedia.github.io/mocha/):

```
TVDB_KEY=[YOUR API KEY HERE] mocha
```
> _Install mocha with: `npm install -g mocha` (sudo may be required for your setup)_

## Example Usage

To start using this library you first need an API key. You can request one [here](http://thetvdb.com/?tab=apiregister).
Then just follow this simple example that fetches all the shows containing "The Simpsons" in the name.

```
var TVDBClient = require("node-tvdb"),
var tvdb       = new TVDBClient("ABC123");

tvdb.getSeries("The Simpsons", function(err, response) {
    // handle error and response
});
```
<commit_msg>fixed invalid code in example<commit_after># node-tvdb

Node.js library for accessing [TheTVDB API](http://www.thetvdb.com/wiki/index.php/Programmers_API). Refactored for [Televiso](https://televi.so/) from [joaocampinhos/thetvdb-api](https://github.com/joaocampinhos/thetvdb-api) to give nicer output and lots of additional features.

Pull requests are always very welcome.

## Features

- Handle errors from API as JavaScript errors
- Only returns relevant data (no need to call response.Data.Series etc.)
- Set language at initialisation or afterwards when needed
- Normalised keys and values
- Empty values parsed as null
- Updates endpoint grouped by type
- Supports both node callback functions and promises
- [Tests with Mocha and Wercker CI](https://app.wercker.com/#applications/53f155d02094f9781d058f98)

## Installation

Install with [npm](http://npmjs.org/):

```
npm install --save node-tvdb
```

And run tests with [Mocha](http://visionmedia.github.io/mocha/):

```
TVDB_KEY=[YOUR API KEY HERE] mocha
```
> _Install mocha with: `npm install -g mocha` (sudo may be required for your setup)_

## Example Usage

To start using this library you first need an API key. You can request one [here](http://thetvdb.com/?tab=apiregister).
Then just follow this simple example that fetches all the shows containing "The Simpsons" in the name.

```
var TVDBClient = require("node-tvdb");
var tvdb       = new TVDBClient("ABC123");

tvdb.getSeries("The Simpsons", function(err, response) {
    // handle error and response
});
```

{'fraction_non_alphanumeric': 0.11220472440944881, 'fraction_numerical': 0.014435695538057743, 'mean_word_length': 4.473967684021544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '5573889', 'n_tokens_mistral': 999, 'n_tokens_neox': 918, 'n_words': 330}