UNPKG

trello-for-wolves

Version:
65 lines (64 loc) 2.51 kB
"use strict"; 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.Plugin = exports.PluginListing = void 0; var BaseResource_1 = require("./BaseResource"); var PluginListing = /** @class */ (function (_super) { __extends(PluginListing, _super); function PluginListing() { return _super !== null && _super.apply(this, arguments) || this; } PluginListing.prototype.addListing = function (params) { return this.apiPost("/", {}, params); }; PluginListing.prototype.updateListing = function (params) { return this.apiPut("/", {}, params); }; return PluginListing; }(BaseResource_1.BaseResource)); exports.PluginListing = PluginListing; /** * Plugins are how Power-Ups are managed via the API. * @see https://developers.trello.com/reference#plugins * @class */ var Plugin = /** @class */ (function (_super) { __extends(Plugin, _super); function Plugin() { return _super !== null && _super.apply(this, arguments) || this; } Plugin.prototype.getPlugin = function () { return this.apiGet("/"); }; Plugin.prototype.getPlugins = function (params) { return this.apiGet("/", params); }; Plugin.prototype.getMemberPrivacy = function () { return this.apiGet("/compliance/memberPrivacy"); }; Plugin.prototype.updatePlugin = function (params) { return this.apiPut("/", {}, params); }; Plugin.prototype.listings = function (idListing) { if (idListing === void 0) { idListing = ""; } return new PluginListing(this.config, this.pathElements, "listings", { identifier: idListing, }); }; return Plugin; }(BaseResource_1.BaseResource)); exports.Plugin = Plugin;