homebridge-syntex-webhooks
Advanced tools
Comparing version 2.3.8-b25 to 2.3.8-b26
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "2.3.8-b25", | ||
"version": "2.3.8-b26", | ||
"description": "A webhook plugin for HTTP devices", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"color-convert": "^1.5.0", | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b34", | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b35", | ||
"json-fs-store": "^1.0.1" | ||
@@ -18,0 +18,0 @@ }, |
@@ -44,5 +44,5 @@ const convert = require('color-convert'); | ||
this.RequestManager.fetch(url, { timeout : 25000 }).then((data) => { | ||
this.RequestManager.fetch(url, { timeout : 25000 }).then((response) => { | ||
if(data != null) | ||
if(response.data != null) | ||
{ | ||
@@ -135,14 +135,10 @@ this.connections[url] = 0; | ||
{ | ||
this.RequestManager.fetch(urlToCall, theRequest).then(function(data, err) { | ||
this.RequestManager.fetch(urlToCall, theRequest).then(function(response) { | ||
if(data != null) | ||
if(response.data != null) | ||
{ | ||
success++; | ||
this.logger.log('success', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [200] %request_result[2]%: [' + (JSON.stringify(data) || '') + ']'); | ||
} | ||
else | ||
{ | ||
this.logger.log('error', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [' + (err.response != null ? err.response.status : -1)+ '] %request_result[2]%: [' + (err.response != null ? err.response.data : '') + ']', err.stack); | ||
} | ||
this.logger.log(response.data != null ? 'success' : 'error', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [' + (response.status || -1)+ '] %request_result[2]%: [' + (response.data || '') + ']', response.error || ''); | ||
@@ -179,12 +175,5 @@ finished++; | ||
this.RequestManager.fetch(urlToCall + colors[0] + ',' + colors[1] + ',' + (state.value ? colors[2] : 0), theRequest).then(function(data, err) { | ||
this.RequestManager.fetch(urlToCall + colors[0] + ',' + colors[1] + ',' + (state.value ? colors[2] : 0), theRequest).then(function(response) { | ||
if(data != null) | ||
{ | ||
this.logger.log('success', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [200] %request_result[2]%: [' + (JSON.stringify(data) || '') + '] '); | ||
} | ||
else | ||
{ | ||
this.logger.log('error', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [' + (err.response != null ? err.response.status : -1) + '] %request_result[2]%: [' + (err.response != null ? err.response.data : '') + ']', err.stack); | ||
} | ||
this.logger.log(response.data != null ? 'success' : 'error', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [' + (response.status || -1) + '] %request_result[2]%: [' + (response.data || '') + ']', response.error || ''); | ||
@@ -207,12 +196,5 @@ finished++; | ||
{ | ||
this.RequestManager.fetch(urlToCall + state.brightness, theRequest).then(function(data, err) { | ||
this.RequestManager.fetch(urlToCall + state.brightness, theRequest).then(function(response) { | ||
if(data != null) | ||
{ | ||
this.logger.log('success', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [200] %request_result[2]%: [' + (JSON.stringify(data) || '') + '] '); | ||
} | ||
else | ||
{ | ||
this.logger.log('error', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [' + (err.response != null ? err.response.status : -1) + '] %request_result[2]%: [' + (err.response != null ? err.response.data : '') + ']', err.stack); | ||
} | ||
this.logger.log(response.data != null ? 'success' : 'error', service.id, service.letters, '[' + service.name + '] %request_result[0]% [' + this.url + '] %request_result[1]% [' + (response.status || -1) + '] %request_result[2]%: [' + (response.data || '') + ']', response.error || ''); | ||
@@ -219,0 +201,0 @@ finished++; |
54688
1033
+ Addedhomebridge-syntex-dynamic-platform@1.0.8-b35(transitive)
+ Addedsyntex-automation@1.2.1-b11(transitive)
+ Addedsyntex-basic@1.0.0-b16(transitive)
- Removedhomebridge-syntex-dynamic-platform@1.0.8-b34(transitive)
- Removedsyntex-automation@1.2.1-b10(transitive)
- Removedsyntex-basic@1.0.0-b14(transitive)