0
我一直在爲node.js使用新的平衡節點模塊,它似乎是由Q承諾驅動的。我不應該做正確的事情,因爲當我將平衡API文檔的回覆與我從此插件獲得的回覆進行比較時,它們完全不同。從平衡節點模塊響應中檢索鏈接和屬性的問題
我試圖通過運行創建客戶:
balanced.marketplace.customers.create({
name: "John Smith",
email: "[email protected]",
phone: "2222222222"
})
.then(function(customer) {
// this prints out a big object which looks like the properties of the module,
// I expected this to print out the sample response as seen in the API docs.
console.log(customer);
// when i run this, it prints out the actual name that was added.
console.log(customer.name);
// but I can't seem to get the various source URLs that the sample response shows.
});
可能有人給我如何正確地做到這一點與平衡節點模塊了堅實的例子嗎?
,如果這是建立在庫本身這將是真棒。 – mjallday 2015-01-15 18:02:23