nuki-web-api
Version:
Node.js implementation (using promises) of the Nuki Web API
24 lines (20 loc) • 457 B
JavaScript
;
/**
* This function returns an account.
*
* @memberof Nuki
* @description Get an account
* @param void
* @returns {Promise}
* @see https://api.nuki.io/#!/Account/get
*/
module.exports.getAccount = function() {
return this
._req('account')
.then(function(account) {
if (typeof account != 'object') {
throw new Error('Did not receive account!');
}
return account;
});
};