fritzapi
Advanced tools
Comparing version 0.10.5 to 0.10.6
13
index.js
@@ -35,2 +35,3 @@ /** | ||
this.password = password; | ||
this.options = { url: uri || 'http://fritz.box' }; | ||
@@ -214,9 +215,2 @@ | ||
/* | ||
* Functional API | ||
*/ | ||
var defaults = { url: 'http://fritz.box' }; | ||
/** | ||
@@ -235,3 +229,3 @@ * Check if numeric value | ||
return new Promise(function(resolve, reject) { | ||
req = extend({}, defaults, req, options); | ||
req = extend({}, options.url, req, options); | ||
req.url += path; | ||
@@ -337,3 +331,2 @@ | ||
if (typeof password !== 'string') throw new Error('Invalid password'); | ||
return executeCommand(null, null, null, options, '/login_sid.lua').then(function(body) { | ||
@@ -422,3 +415,3 @@ var challenge = body.match("<Challenge>(.*?)</Challenge>")[1]; | ||
// get basic device info (XML) | ||
module.exports.getBasicDeviceStats = function(sid, options) | ||
module.exports.getBasicDeviceStats = function(sid, ain, options) | ||
{ | ||
@@ -425,0 +418,0 @@ return executeCommand(sid, 'getbasicdevicestats', ain, options); |
{ | ||
"name": "fritzapi", | ||
"version": "0.10.5", | ||
"version": "0.10.6", | ||
"author": "Andreas Goetz <cpuidle@gmx.de>", | ||
@@ -52,4 +52,4 @@ "description": "Home automation node API for Fritz!Box, Fritz!DECT and FRITZ!Powerline devices", | ||
"cheerio": "^0.22.0", | ||
"command-line-args": "^4.0.1", | ||
"command-line-usage": "^4.0.0", | ||
"command-line-args": "^5.1.1", | ||
"command-line-usage": "^6.0.2", | ||
"extend": "^3.0.0", | ||
@@ -60,7 +60,7 @@ "request": "^2.87.0", | ||
"devDependencies": { | ||
"chai": "4.1.x", | ||
"chai": "4.2.x", | ||
"istanbul": "^0.4.5", | ||
"jshint": "^2.9.5", | ||
"mocha": "^5.2.0" | ||
"mocha": "^6.2.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
49477
13
962
+ Addedansi-styles@3.2.1(transitive)
+ Addedarray-back@4.0.2(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcommand-line-args@5.2.1(transitive)
+ Addedcommand-line-usage@6.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedfind-replace@3.0.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedlodash.camelcase@4.3.0(transitive)
+ Addedreduce-flatten@2.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedtable-layout@1.0.2(transitive)
+ Addedtypical@4.0.05.2.0(transitive)
+ Addedwordwrapjs@4.0.1(transitive)
- Removedansi-escape-sequences@4.1.0(transitive)
- Removedarray-back@1.0.42.0.0(transitive)
- Removedcommand-line-args@4.0.7(transitive)
- Removedcommand-line-usage@4.1.0(transitive)
- Removedfind-replace@1.0.3(transitive)
- Removedlodash.padend@4.6.1(transitive)
- Removedreduce-flatten@1.0.1(transitive)
- Removedtable-layout@0.4.5(transitive)
- Removedtest-value@2.1.0(transitive)
- Removedtypical@2.6.1(transitive)
- Removedwordwrapjs@3.0.0(transitive)
Updatedcommand-line-args@^5.1.1
Updatedcommand-line-usage@^6.0.2