我看到我可以include:2使用node.js javascript api在getEntries方法中传递查询对象.如何通过getEntry返回单个对象的调用来实现.
// how do I get the nested objects by passing the parameter include:1
client.getEntry('<entry_id>', {<what goes here?>})
.then(function (entry) {
// logs the entry metadata
})
Run Code Online (Sandbox Code Playgroud)
getEntry返回1,只有1个条目.如果要包含1个父条目(也就是多个条目)的链接条目,则必须使用该getEntries方法并指定sys.id要检索的父条目.像这样:
client.getEntries({'sys.id': '<entry_id>'})
.then(entries => {
...
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
501 次 |
| 最近记录: |