This commit is contained in:
2023-08-29 20:06:52 +02:00
parent 7c2eec4446
commit 25702c073a
225 changed files with 1071 additions and 808 deletions

View File

@@ -1,4 +1,4 @@
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Protor = void 0;
var axios_1 = require("axios");
var Protor = /** @class */ (function () {
@@ -7,25 +7,25 @@ var Protor = /** @class */ (function () {
this.port = port;
}
Protor.prototype._getBaseURI = function () {
return "http://" + this.ip + ":" + this.port + "/";
return "http://".concat(this.ip, ":").concat(this.port, "/");
};
Protor.prototype.isOnline = function (callback) {
axios_1["default"].get(this._getBaseURI() + 'online').then(function () {
axios_1.default.get(this._getBaseURI() + 'online').then(function () {
callback(true);
})["catch"](function () {
}).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 () {
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 () {
axios_1.default.get(this._getBaseURI() + 'api/animation/fadeout/' + duration).then(function () {
}).catch(function () {
});
};
return Protor;