1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var request = require("request");
|
4 | var Bot = (function () {
|
5 | function Bot(id) {
|
6 | this.id = id;
|
7 | }
|
8 | Bot.prototype.get = function () {
|
9 | var _this = this;
|
10 | return new Promise(function (resolve, reject) {
|
11 | request({
|
12 | uri: "https://proxy-api.recime.io/v1/bots/" + _this.id,
|
13 | json: true
|
14 | }, function (err, response, body) {
|
15 | if (err) {
|
16 | return reject(err);
|
17 | }
|
18 | resolve(body);
|
19 | });
|
20 | });
|
21 | };
|
22 | return Bot;
|
23 | }());
|
24 | exports.Bot = Bot;
|