Google 日历 syncToken 不工作
Google calendar syncToken not working
我正在使用 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)
});
我遇到的问题是 syncToken 被排除了,所以我总是收到所有事件。
不知道是不是我哪里做错了
好吧,他们提供的示例看起来很像
https://developers.google.com/google-apps/calendar/quickstart/nodejs
他们使用 google-auth-library@0.*
并且在这个库版本中 syncToken
中有一个错误。
我卸载了 google-auth-library@0.*
并安装了最新版本(应用此更改 https://github.com/google/google-auth-library-nodejs/releases/tag/v1.0.0),现在一切正常。
PD:不知道有没有人可以帮我关闭这个答案。
我正在使用 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)
});
我遇到的问题是 syncToken 被排除了,所以我总是收到所有事件。
不知道是不是我哪里做错了
好吧,他们提供的示例看起来很像
https://developers.google.com/google-apps/calendar/quickstart/nodejs
他们使用 google-auth-library@0.*
并且在这个库版本中 syncToken
中有一个错误。
我卸载了 google-auth-library@0.*
并安装了最新版本(应用此更改 https://github.com/google/google-auth-library-nodejs/releases/tag/v1.0.0),现在一切正常。
PD:不知道有没有人可以帮我关闭这个答案。