<commit_before># Postcard Creator API [![Build Status](https://travis-ci.org/gido/postcardcreator.svg?branch=master)](https://travis-ci.org/gido/postcardcreator)
A node.js API for the [Swiss Post Postcard Creator](http://postcardcreator.post.ch).

# Basic usage

```javascript
var path = require('path'),
    Postcardcreator = require('postcardcreator'),
    Postcard = postcardcreator.Postcard;

var client = new Postcardcreator(postcard_user, postcard_pass);

var message = "Hello, here is a picture of me. Best!";
var assetStream = fs.createReadStream(path.join(__dirname, 'me_under_the_sun.jpg'));
// here is my real address you can use it to send me picture of your works ;-)
var recipient = {
    salutation: "Monsieur",
    givenName: "Gilles",
    familyName: "Doge",
    company: "Antistatique.net",
    street: "Rue de Sébeillon 9b",
    postCode: "1004",
    place: "Lausanne"
};

var postcard = new Postcard(assetStream, message, recipient);

client.sendPostcard(postcard, function(err, result) {
    if (err) {
        console.log("Error when sending the postcard. ", err);
        handleError(err);
        return;
    }

    console.log("Postcard sent with success !");
    console.log(result);
});<commit_msg>Fix a typo in the example code<commit_after># Postcard Creator API [![Build Status](https://travis-ci.org/gido/postcardcreator.svg?branch=master)](https://travis-ci.org/gido/postcardcreator)
A node.js API for the [Swiss Post Postcard Creator](http://postcardcreator.post.ch).

# Basic usage

```javascript
var path = require('path'),
    Postcardcreator = require('postcardcreator'),
    Postcard = Postcardcreator.Postcard;

var client = new Postcardcreator(postcard_user, postcard_pass);

var message = "Hello, here is a picture of me. Best!";
var assetStream = fs.createReadStream(path.join(__dirname, 'me_under_the_sun.jpg'));
// here is my real address you can use it to send me picture of your works ;-)
var recipient = {
    salutation: "Monsieur",
    givenName: "Gilles",
    familyName: "Doge",
    company: "Antistatique.net",
    street: "Rue de Sébeillon 9b",
    postCode: "1004",
    place: "Lausanne"
};

var postcard = new Postcard(assetStream, message, recipient);

client.sendPostcard(postcard, function(err, result) {
    if (err) {
        console.log("Error when sending the postcard. ", err);
        handleError(err);
        return;
    }

    console.log("Postcard sent with success !");
    console.log(result);
});
{'fraction_non_alphanumeric': 0.13295500608025942, 'fraction_numerical': 0.004053506282934738, 'mean_word_length': 4.130977130977131, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '1930047', 'n_tokens_mistral': 804, 'n_tokens_neox': 789, 'n_words': 212}