iot-js-sdk
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -35,2 +35,16 @@ 'use strict'; | ||
FillLevelController.prototype.getFillLevels = function getFillLevels() { | ||
var result = []; | ||
return this.connection.get('/containers/filllevel').then(function (data) { | ||
return data.map(function (datum) { | ||
result.push({ | ||
id: datum.id, | ||
fillLevel: datum.fillLevel | ||
}); | ||
}); | ||
}).then(function () { | ||
return result; | ||
}); | ||
}; | ||
return FillLevelController; | ||
@@ -40,2 +54,2 @@ }(); | ||
exports.default = FillLevelController; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9maWxsLWxldmVsL2ZpbGwtbGV2ZWwtY29udHJvbGxlci5qcyJdLCJuYW1lcyI6WyJGaWxsTGV2ZWxDb250cm9sbGVyIiwiY29ubmVjdGlvbiIsIkVycm9yIiwiZ2V0RmlsbExldmVsIiwiaWQiLCJQcm9taXNlIiwicmVqZWN0IiwiZ2V0IiwidGhlbiIsImRhdGEiLCJmaWxsTGV2ZWwiXSwibWFwcGluZ3MiOiI7Ozs7QUFBQTs7Ozs7Ozs7SUFFcUJBLG1CO0FBQ25CLCtCQUFZQyxVQUFaLEVBQXdCO0FBQUE7O0FBQ3RCLFFBQUksRUFBRUEsMENBQUYsQ0FBSixFQUF5QztBQUN2QyxZQUFNLElBQUlDLEtBQUosQ0FBVSx1REFBVixDQUFOO0FBQ0Q7QUFDRCxTQUFLRCxVQUFMLEdBQWtCQSxVQUFsQjtBQUNEOztnQ0FFREUsWSx5QkFBYUMsRSxFQUFJO0FBQ2YsUUFBSSxPQUFPQSxFQUFQLEtBQWMsUUFBbEIsRUFBNEI7QUFDMUIsYUFBT0MsUUFBUUMsTUFBUixDQUFlLElBQUlKLEtBQUosQ0FBVSwyQ0FBVixDQUFmLENBQVA7QUFDRDtBQUNELFdBQU8sS0FBS0QsVUFBTCxDQUFnQk0sR0FBaEIsQ0FBb0IsMkJBQTJ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pXG4gICAgICAudGhlbihkYXRhID0+ICh7XG4gICAgICAgIGlkOiBkYXRhLmlkLFxuICAgICAgICBmaWxsTGV2ZWw6IGRhdGEuZmlsbExldmVsXG4gICAgICB9KSk7XG4gIH1cblxuICBnZXRGaWxsTGV2ZWxzKCkge1xuICAgIGNvbnN0IHJlc3VsdCA9IFtdO1xuICAgIHJldHVybiB0aGlzLmNvbm5lY3Rpb24uZ2V0KCcvY29udGFpbmVycy9maWxsbGV2ZWwnKVxuICAgICAgLnRoZW4oZGF0YSA9PiBkYXRhLm1hcChkYXR1bSA9PiB7XG4gICAgICAgIHJlc3VsdC5wdXNoKHtcbiAgICAgICAgICBpZDogZGF0dW0uaWQsXG4gICAgICAgICAgZmlsbExldmVsOiBkYXR1bS5maWxsTGV2ZWxcbiAgICAgICAgfSk7XG4gICAgICB9KSlcbiAgICAgIC50aGVuKCgpID0+IHJlc3VsdCk7XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "iot-js-sdk", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "IoT JavaScript SDK", | ||
@@ -8,4 +8,3 @@ "main": "src/index.js", | ||
"test": "concurrently 'eslint .' 'karma start --single-run --color'", | ||
"clearbuild": "rm -rf build/", | ||
"babelify": "npm run clearbuild && babel src --out-dir build --source-maps inline && cp package.json README.md build/" | ||
"babelify": "babel src --out-dir build --source-maps inline && cp package.json README.md build/" | ||
}, | ||
@@ -12,0 +11,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10098
85