Commit 4c47605c authored by Patricio Bruna's avatar Patricio Bruna

Added version and fixed BatchRequest error

parent e042fe47
......@@ -33,6 +33,9 @@ var callback = function(err, data) {
};
zimbraApi.getAllDomains(callback);
ZimbraAdminApi.version();
// "version"
```
## Install
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "zimbra-admin-api-js",
"version": "0.0.23",
"version": "0.0.24",
"private": true,
"main": "lib/zimbra-admin-api.js",
"dependencies": {
......
......@@ -2,6 +2,7 @@
// See LICENSE.txt for license information.
var jszimbra = require('js-zimbra');
var pjson = require('../package.json');
import Dictionary from './utils/dictionary.js';
import ResponseParser from './utils/response_parser.js';
import Error from './zimbra/error.js';
......@@ -16,6 +17,10 @@ export default class ZimbraAdminApi {
this.dictionary = new Dictionary();
}
static version() {
return pjson.version;
}
buildRequestData (request_name, callback) {
const request_data = { };
// TODO: Eliminar dependencia de client que se pasa a todos lados
......@@ -81,8 +86,9 @@ export default class ZimbraAdminApi {
buildRequest(options = {}) {
let request = null;
const that = this;
this.client.getRequest(options, (err, req) => {
if (err) return error(err);
if (err) return console.error(err);
request = req;
});
return request;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment