mailman-client

0.0.2 • Public • Published

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

Dependencies (14)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i mailman-client

    Weekly Downloads

    1

    Version

    0.0.2

    License

    ISC

    Last publish

    Collaborators

    • black-perl