[英]Google calendar syncToken not working
I'm using google calendar's node sdk, and I'm doing this call: 我正在使用Google日历的节点sdk,并且正在执行此调用:
const google = require('googleapis');
const calendar = google.calendar('v3');
calendar.events.list({
auth,
calendarId,
maxResults: 2500,
syncToken: 'COCikJ6a8NgCEOCikJ6a8NgCGAU='
}, (err, data) => {
console.log(err)
console.log(data)
});
The problem I'm having is that syncToken is obviated, so I always receive all events. 我遇到的问题是取消了syncToken,所以我总是收到所有事件。
I don't know if I'm doing something wrong here. 我不知道我在这里做错什么了。
Well it looks like in the example they provide 看起来像他们提供的示例
https://developers.google.com/google-apps/calendar/quickstart/nodejs https://developers.google.com/google-apps/calendar/quickstart/nodejs
they use google-auth-library@0.*
and in this library version there's a bug in syncToken
. 他们使用google-auth-library@0.*
并且在此库版本中, syncToken
存在一个错误。
I uninstalled google-auth-library@0.*
and installed last version (applying this changes https://github.com/google/google-auth-library-nodejs/releases/tag/v1.0.0 ) and everything worked now. 我卸载了google-auth-library@0.*
并安装了最后一个版本(应用此更改https://github.com/google/google-google-auth-library-nodejs/releases/tag/v1.0.0 ),现在一切正常。
PD: I don't know if someone can close this answer for me. PD:我不知道有人能为我关闭这个答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.