Rebuild lib

This commit is contained in:
meew0
2016-01-24 14:38:27 +01:00
parent 2d68849027
commit c5174b4d93
2 changed files with 126 additions and 101 deletions

View File

@@ -63,6 +63,23 @@ var Client = (function (_EventEmitter) {
this.internal = new _InternalClient2["default"](this);
}
// def loginWithToken
Client.prototype.loginWithToken = function loginWithToken(token) {
var email = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
var password = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
var callback = arguments.length <= 3 || arguments[3] === undefined ? function () /*err, token*/{} : arguments[3];
if (typeof email === "function") {
// email is the callback
callback = email;
email = null;
password = null;
}
return this.internal.loginWithToken(token, email, password).then(dataCallback(callback), errorCallback(callback));
};
// def login
Client.prototype.login = function login(email, password) {