recime-bot-runtime
Version:
This runtime is intended to run inside a micro-service container with platform specific integration and module interpreter.
34 lines (33 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var request = require("request");
var BotModel = /** @class */ (function () {
function BotModel(id) {
this.id = id;
}
BotModel.prototype.get = function () {
var _this = this;
return new Promise(function (resolve, reject) {
request({
url: "https://proxy-api.recime.io/v1/bots/" + _this.id,
json: true
}, function (err, response, body) {
if (err) {
console.error(err);
return reject(err);
}
resolve(body);
});
});
};
BotModel.prototype.static = function () {
return Promise.resolve({
id: this.id,
name: 'Recime Bot',
description: 'Your bot has been configured successfully',
config: process.env
});
};
return BotModel;
}());
exports.BotModel = BotModel;