简体   繁体   中英

Retrieving card data in card-badges

I have an overlay and I'm able to save data using

t.set('card', 'shared', 'key', 'value')

Also i'm able to read that data using

return Promise.all([
    t.get('card', 'shared', 'key1'),
    t.get('card', 'shared', 'key2') 
  ])
  .spread(function(key1, key2){

My problem is that I want to read those values from the TrelloPowerUp.initialize and inside the card-badges

I tried using

var x = t.get('card', 'shared', 'key1');

If I put console.log(x), the value is in there but is inside an object and can't make it work. The name of the property is _settledValue

I already tried x.getValue() and x.value()

file.png

好啦回答我自己

t.get('card', 'shared', 'var_name').then(function(var_name){ /* operations with var_name here */ }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM