Trello通电时在初始化时获取董事会的ID

是否可以通过加电方式获取当前板卡的当前ID?

我的client.js

中是这样的
var Promise = TrelloPowerup.Promise;

TrelloPowerup.initialize({
    // Start adding handlers for your capabilities here!
  'current-board': function(t,options){
    console.log(boardId) // I want to get the board's Id
  },'card-buttons': function(t,options) {
    return t.set("member","shared","hello","world")
    .then(function(){
        return [{
        icon: BLACK_rocket_ICON,text: 'Estimate Size',callback: function(t) {
                return t.popup({
                  title: "Estimation",url: 'estimate.html',});
              }
            }];
    })
    },});

开机初始化时,我要控制台记录board Id

drakeson 回答:Trello通电时在初始化时获取董事会的ID

下面的代码可以在client.js文件中使用,以获取板的ID或名称等。

TrelloPowerUp.initialize({
    'current-board': function(t,options){
    t.board('id')
        .then(function (name) {
            console.log(name);
    });
});

以上代码适用于t.board('name')以及t.card('name')之类的卡。

本文链接:https://www.f2er.com/2415826.html

大家都在问