nuki-web-api
Version:
Node.js implementation (using promises) of the Nuki Web API
85 lines (62 loc) • 5.03 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>OpenerIntercomBrand.js - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="Nuki.html">Nuki</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getAccount">module.exports.getAccount</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getBrand">module.exports.getBrand</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getModel">module.exports.getModel</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getNotification">module.exports.getNotification</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getSmartlock">module.exports.getSmartlock</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getSmartlockAuth">module.exports.getSmartlockAuth</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getSmartlockAuths">module.exports.getSmartlockAuths</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getSmartlockLogs">module.exports.getSmartlockLogs</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getSmartlocks">module.exports.getSmartlocks</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getSmartlockUsers">module.exports.getSmartlockUsers</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.getSubscription">module.exports.getSubscription</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.setAction">module.exports.setAction</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#.module.exports.updateSmartlock">module.exports.updateSmartlock</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="Nuki.html#_req">_req</a></span></li>
</nav>
<div id="main">
<h1 class="page-title">OpenerIntercomBrand.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>'use strict';
/**
* This function returns the intercom brands of all openers.
*
* @memberof Nuki
* @description Get a list of ntercom brands for all of your openers
* @param {Integer} [brandId] The brand id
* @returns {Promise}
* @see https://api.nuki.io/#!/OpenerIntercomBrand
*/
module.exports.getBrand = function(brandId)
{
let self = this;
return this
._req('opener/brand' + (brandId ? '/' + brandId : ''))
.then(function(brands)
{
if ((!brandId && !Array.isArray(brands)) || (brandId && typeof brands != 'object'))
throw new Error('Did not receive brands!');
return brands;
});
};
</code></pre>
</article>
</section>
</div>
<br class="clear">
<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Sep 08 2019 22:07:49 GMT+0200 (GMT+02:00) using the Minami theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>