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