trello-for-wolves
Version:
Node.js wrapper for Trello API...for wolves.
51 lines (50 loc) • 2.01 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Token = void 0;
var BaseResource_1 = require("./BaseResource");
var Member_1 = require("./Member");
var Webhook_1 = require("./Webhook");
var Token = /** @class */ (function (_super) {
__extends(Token, _super);
function Token() {
return _super !== null && _super.apply(this, arguments) || this;
}
Token.prototype.getToken = function (params) {
return this.apiGet("/", params);
};
Token.prototype.getTokens = function (params) {
return this.apiGet("/", params);
};
Token.prototype.getFieldValue = function (field) {
return this.apiGet("/".concat(field));
};
Token.prototype.deleteToken = function () {
return this.apiDelete("/");
};
Token.prototype.member = function () {
return new Member_1.Member(this.config, this.pathElements, "member");
};
Token.prototype.webhooks = function (webhookId) {
if (webhookId === void 0) { webhookId = ""; }
return new Webhook_1.Webhook(this.config, this.pathElements, "webhooks", {
identifier: webhookId,
});
};
return Token;
}(BaseResource_1.BaseResource));
exports.Token = Token;