You can't create decks through the API yet, but you can update all the necessary fields. For a script I wrote for Keiss a while back, I had it setup the deck with images for all the cards along with their name. I just created the deck, gave it a name, clicked add card 42 times and ran the script, which grabbed all the cards for the deck (it knew what the deck was named) and made each of them into the right card: case '!bt-setup-deck':
var deck = findObjs({type:'deck',name:'Map Cards'})[0];
if(deck)
{
var deckCards=findObjs({type:'card',deckid:deck.id});
_.each(Tiles,function(t){
if(!t.special)
{
var c=deckCards.pop();
if(c)
{
c.set({
name: t.name,
avatar: Cards[CardNumFromWhere(t.where)].imgsrc
});
}
else
{
log('No card available for: '+t.name);
}
}
});
}
break;
I know you could write something similar for setting up your numbers and tiles. The only obnoxious part is getting all the image urls and tying them to the right name.