node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org ยป

mailman-client

Description

A Node.js REST client for mailman-core.

Installing

$ npm install mailman-client

Testing

$ npm test

Generating docs

$ npm run docgen

Code coverage

$ npm run cover

Running JSHint

$ npm run jshint

Quick start

> var Client = require('mailman-client');
> var cli = new Client({endpoint : 'http://localhost:8001/3.0/'
                        'username' : 'restadmin',
                        'password' : 'restpass'
                        });
                        
// Usage with a callback function
> var cb = function(err,data) {
    if (err) {
        console.log(err);
    }
    else {
        console.log(data);
    }
};
> cli.getLists(cb);

// Promises
> cli.getLists().then(console.log)

Links