Constructor
new Nuki(token, optionsopt) → {Nuki}
Based on Nuki Web API v.1.1.1 as of 30.08.2018
- Version:
- Author:
-
- License:
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
token |
String
|
|
Token for authentication
|
options |
Object
|
<optional>
|
Further options
Name |
Type |
Attributes |
Description |
url |
String
|
<optional>
|
Override default API url (which is https://api.nuki.io)
|
|
Methods
(static) module.exports.getAccount(void) → {Promise}
Get an account
- Source:
- See:
-
Parameters:
Name |
Type |
Description |
void |
|
|
(static) module.exports.getBrand(brandIdopt) → {Promise}
Get a list of ntercom brands for all of your openers
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
brandId |
Integer
|
<optional>
|
The brand id
|
(static) module.exports.getModel(intercomIdopt) → {Promise}
Get a list of intercom models for all of your openers
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
intercomId |
Integer
|
<optional>
|
The intercom id
|
(static) module.exports.getNotification(notificationIdopt) → {Promise}
Get a list of notifications for all of your smartlocks
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
notificationId |
Integer
|
<optional>
|
The notification id
|
(static) module.exports.getSmartlock(smartlockId) → {Promise}
This function returns a specific lock.
- Source:
- See:
-
Parameters:
Name |
Type |
Description |
smartlockId |
Integer
|
The smartlock id
|
(static) module.exports.getSmartlockAuth(smartlockId, userIdopt) → {Promise}
Get a list of smartlock authorizations
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
smartlockId |
Integer
|
|
The smartlock id
|
userId |
String
|
<optional>
|
The smartlock auth unique id
|
(static) module.exports.getSmartlockAuths(parametersopt) → {Promise}
Get a list of smartlock authorizations for your smartlocks
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
parameters |
Object
|
<optional>
|
Parameters to use
Name |
Type |
Description |
accountUserId |
Integer
|
Filter for account users
|
|
(static) module.exports.getSmartlockLogs(smartlockIdopt, parametersopt) → {Promise}
Get a list of smartlock logs for all of your smartlocks
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
smartlockId |
Integer
|
<optional>
|
The smartlock id
|
parameters |
Object
|
<optional>
|
Parameters to use
Name |
Type |
Description |
accountUserId |
Integer
|
Filter for account users
|
fromDate |
String
|
Filter for start date (RFC3339)
|
toDate |
String
|
Filter for end date (RFC3339)
|
action |
Integer
|
Filter for action
|
id |
Integer
|
Filter for older logs
|
limit |
Integer
|
Filter for amount of logs
|
|
(static) module.exports.getSmartlocks(parametersopt) → {Promise}
This function returns a list of locks.
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
parameters |
Object
|
<optional>
|
Parameters to use
Name |
Type |
Description |
authId |
Integer
|
Filter for authId
|
type |
Integer
|
Filter for type
|
|
(static) module.exports.getSmartlockUsers(parametersopt) → {Promise}
Synonym for getSmartlockAuths()
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
parameters |
Object
|
<optional>
|
Parameters to use
Name |
Type |
Description |
accountUserId |
Integer
|
Filter for account users
|
|
(static) module.exports.getSubscription(subscriptionIdopt) → {Promise}
Get a list of subscriptions for all of your smartlocks
- Source:
- See:
-
Parameters:
Name |
Type |
Attributes |
Description |
subscriptionId |
Integer
|
<optional>
|
The subscription id
|
(static) module.exports.setAction(smartlockId, action) → {Promise}
This function applies an action on your smartolock, e.g. lock, unlock or unlatch.
- Source:
- See:
-
Parameters:
Name |
Type |
Description |
smartlockId |
Integer
|
The smartlock id
|
action |
Object
|
Integer
|
Action to be applied, if {Object} is provided, the indizes command and option have to be supplied, otherwise {Integer} for a shortcut of action.command
Name |
Type |
Attributes |
Description |
command |
Integer
|
|
The action - 1: unlock, 2: lock, 3: unlatch, 4: lockngo, 5: lockngo with unlatch
|
option |
Integer
|
<optional>
|
The option mask: 0: none, 2: force, 4: full lock
|
|
(static) module.exports.updateSmartlock(smartlockId, update) → {Promise}
This function updates a smartlock.
- Source:
- See:
-
Parameters:
Name |
Type |
Description |
smartlockId |
Integer
|
The smartlock id
|
update |
Object
|
Boolean
|
Values to be updated, if {Object} is provided, either or both the indizes name and favorite have to be supplied, otherwise {Boolean} for a shortcut to favorite
Name |
Type |
Attributes |
Description |
name |
String
|
<optional>
|
The new name of the smartlock
|
favorite |
Boolean
|
<optional>
|
True if the smartlock is favorite
|
|
_req(paths, parametersopt, methodopt, bodyopt, optionsopt) → {Promise.<Object>}
This function requests an action.
- Source:
Parameters:
Name |
Type |
Attributes |
Default |
Description |
paths |
String
|
Array
|
|
|
Paths to attach to URL
|
parameters |
Object
|
<optional>
|
{}
|
Parameters to attach to URL ({key: value} turns to ?key=value respectively &key=value)
|
method |
String
|
<optional>
|
GET
|
Method to use [GET, POST, PUT, DELETE]
|
body |
String
|
<optional>
|
{}
|
Body data to send
|
options |
String
|
<optional>
|
{}
|
Additional options to use
|
Returns:
-
Type:
-
Promise.<Object>