trello-for-wolves
Version:
Node.js wrapper for Trello API...for wolves.
72 lines (71 loc) • 3.08 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.CustomBoardBackground = exports.BoardBackground = void 0;
var BaseResource_1 = require("./BaseResource");
/**
* This class handles both the "boardBackground" and "customBoardBackground"
* resources. For "customBoardBackgrounds", the resource path is overridden
* when an instance is created in the Member class.
* @class
*/
var BoardBackground = /** @class */ (function (_super) {
__extends(BoardBackground, _super);
function BoardBackground() {
return _super !== null && _super.apply(this, arguments) || this;
}
BoardBackground.prototype.getBoardBackground = function (params) {
return this.apiGet("/", params);
};
BoardBackground.prototype.getBoardBackgrounds = function (params) {
return this.apiGet("/", params);
};
BoardBackground.prototype.uploadBoardBackground = function (file) {
return this.apiPost("/", { file: file });
};
BoardBackground.prototype.updateBoardBackground = function (params) {
return this.apiPut("/", params);
};
BoardBackground.prototype.deleteBoardBackground = function () {
return this.apiDelete("/");
};
return BoardBackground;
}(BaseResource_1.BaseResource));
exports.BoardBackground = BoardBackground;
var CustomBoardBackground = /** @class */ (function (_super) {
__extends(CustomBoardBackground, _super);
function CustomBoardBackground() {
return _super !== null && _super.apply(this, arguments) || this;
}
CustomBoardBackground.prototype.getCustomBoardBackground = function (params) {
return this.apiGet("/", params);
};
CustomBoardBackground.prototype.getCustomBoardBackgrounds = function () {
return this.apiGet("/");
};
CustomBoardBackground.prototype.uploadCustomBoardBackground = function (params) {
return this.apiPost("/", params);
};
CustomBoardBackground.prototype.updateCustomBoardBackground = function (params) {
return this.apiPut("/", params);
};
CustomBoardBackground.prototype.deleteCustomBoardBackground = function () {
return this.apiDelete("/");
};
return CustomBoardBackground;
}(BaseResource_1.BaseResource));
exports.CustomBoardBackground = CustomBoardBackground;