Constructor
new Homey.CloudWebhook(id, secret, data)
Parameters:
Name | Type | Description |
---|---|---|
id |
string
|
Webhook ID |
secret |
string
|
Webhook Secret |
data |
Object
|
Webhook Data |
Methods
register(callbackopt) → {Promise}
Register the webhook. This is a shortcut for ManagerCloud#registerWebhook
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
unregister(callbackopt) → {Promise}
Unregister the webhook. This is a shortcut for ManagerCloud#unregisterWebhook
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
genericCallbackFunction
|
<optional> |
Returns:
- Type:
-
Promise
Events
.on('message')
This event is fired when a webhook message has been received.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object
|
|