呵呵,我在我的google nodejs-客户端项目中使用了NodeJS包,我正在尝试构建我对日历事件的查询。它正在工作,但我不能指定“字段”字段。
这将返回五个完整的日历事件:
client.calendar.events.list({
calendarId: gcal_id,
maxResults: 5
})
.withAuthClient(authClient)
.execute(function(err, calendar) {
if (err)
console.log(err);
else
console.log(calendar);
});
但这没有任何回报:
client.calendar.events.list({
calendarId: gcal_id,
maxResults: 5,
fields: {
items: ["end","start","status","summary"]
}
})
.withAuthClient(authClient)
.execute(function(err, calendar) {
if (err)
console.log(err);
else
console.log(calendar);
});
我也试过:
fields: {
items: "end,start,status,summary"
}
基于V3 API,我应该能够进行如下查询:V3
我不知道如何指定URL的"fields=items(end%2Cstart%2Cstatus%2Csummary)“部分,但是我已经在谷歌的API中测试过它了,所以我知道我在JavaScript中做了一些错误的事情。
任何帮助都将不胜感激。现在,我想我只需要清理从第一个代码片段中得到的响应。
发布于 2013-10-18 01:45:12
嗯,我想出来了。应该是一根绳子。
fields: "items(end,start,status,summary)"
https://stackoverflow.com/questions/19440481
复制相似问题