@linagora/james-admin-client

JS library to help configuring James through web administration APIs


Keywords
james, mail, api
License
AGPL-3.0
Install
npm install @linagora/james-admin-client@0.14.0

Documentation

james-admin-client

JS library to help configuring James through web administration APIs

Build Status

Installation

Bower:

bower install james-admin-client

NPM and Yarn:

npm install @linagora/james-admin-client

yarn add https://github.com/linagora/james-admin-client.git

Usage

const { Client } = require('@linagora/james-admin-client');

const options = {
  token: '...',
  apiUrl: 'http://james.yourserver.com'
};
const client = new Client(options);

client.getQuota().then((response) => {
  console.log(response);
}, (err) => {
  console.log(err);
});

On browser:

const james = window.james;
const Client = james.Client;

...

Test & linting

Tests in test dir are provided by mocha framework with axios-mock-adapter and chai-as-promised plugins.

To run execute all test cases:

npm run unit-test

To lint the code:

npm run lint

Release

Assume that you are in master branch and you have write access to the origin remote, type the following command to release a new version:

./scripts/release.sh x.y.z

In case your Git remote is NOT origin:

./scripts/release.sh x.y.z my-remote

Licence

Affero GPL v3