Initial commit
This commit is contained in:
34
Backend/dist/Integrations/buildin/protor/ProtorClass.js
vendored
Normal file
34
Backend/dist/Integrations/buildin/protor/ProtorClass.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
exports.__esModule = true;
|
||||
exports.Protor = void 0;
|
||||
var axios_1 = require("axios");
|
||||
var Protor = /** @class */ (function () {
|
||||
function Protor(ip, port) {
|
||||
this.ip = ip;
|
||||
this.port = port;
|
||||
}
|
||||
Protor.prototype._getBaseURI = function () {
|
||||
return "http://" + this.ip + ":" + this.port + "/";
|
||||
};
|
||||
Protor.prototype.isOnline = function (callback) {
|
||||
axios_1["default"].get(this._getBaseURI() + 'online').then(function () {
|
||||
callback(true);
|
||||
})["catch"](function () {
|
||||
callback(false);
|
||||
});
|
||||
};
|
||||
Protor.prototype.fadeIn = function (duration) {
|
||||
if (duration === void 0) { duration = 0; }
|
||||
axios_1["default"].get(this._getBaseURI() + 'api/animation/fadein/' + duration).then(function () {
|
||||
})["catch"](function () {
|
||||
});
|
||||
};
|
||||
Protor.prototype.fadeOut = function (duration) {
|
||||
if (duration === void 0) { duration = 0; }
|
||||
axios_1["default"].get(this._getBaseURI() + 'api/animation/fadeout/' + duration).then(function () {
|
||||
})["catch"](function () {
|
||||
});
|
||||
};
|
||||
return Protor;
|
||||
}());
|
||||
exports.Protor = Protor;
|
||||
//# sourceMappingURL=ProtorClass.js.map
|
||||
Reference in New Issue
Block a user