@linagora/james-admin-client
v0.14.0
Published
JS library to help configuring James through web administration APIs
Downloads
114
Readme
james-admin-client
JS library to help configuring James through web administration APIs
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