同様のスレッドをすべてチェックしましたが、探しているものが見つかりませんでした。ここ数日悩んでいます。
空き時間情報リクエストを作成しようとしています。
コードは同じですが、エラーなしでカレンダーを返す場合もあれば、以下のエラーが発生する場合もあります{ domain: "global", reason: "notFound"}
誰かが同様の問題に遭遇しましたか?
googleapis.discover('calendar', 'v3').execute(function(err, client) {
var oauth2Client = new OAuth2Client(clientID, secret, callback);
oauth2Client.credentials = {
access_token: mytoken,
refresh_token: refreshtoken
}
client.calendar.freebusy.query({
"timeMin": day + 'T00:00:00' + finalTimeZone,
"timeMax": nextday + 'T00:00:00' + finalTimeZone,
'timeZone': timezone
}).withAuthClient(oauth2Client).execute(function(err, result) {
if (err) {
console.log(err);
} else {
console.log(result);
}
});
});
結果:
{
kind: "calendar#freeBusy",
timeMin: "2013-11-05T08:00:00.000Z",
timeMax: "2013-11-06T08:00:00.000Z",
calendars: {
email@gmail.com: {
errors: [
{
domain: "global",
reason: "notFound"
}
],
busy: [ ]
}
}
}