我遇到了一个我不明白的问题。该脚本正在运行,突然它说该请求未定义。
这是脚本:
function insertEvents(){
var event = {
"summary": userEmail ,
"location": '4 rue mogador Trouville sur mere',
"description": 'Test de lgtrouville.com',
"end": [
{"dateTime": "2018-05-28T10:00:00+02:00"},
{"timeZone": "Europe/Paris"}
],
"start": [
{"dateTime": "2018-05-25T10:00:00+02:00"},
{"timeZone": "Europe/Paris"}
],
"attendees": [
{"email": "lpage@example.com"},
{"email": "sbrin@example.com"}
],
"reminders": {
"useDefault": false,
"overrides": [
{"method": "email", "minutes": 24 * 60},
{"method": "popup", "minutes": 10}
]
}
};
var request = gapi.client.calendar.events.insert({
'calendarId': userEmail ,
'resource': event
});
request.execute(function(event) {
appendPre('Event created: ' + event.htmlLink);
});
}
输出结果表明event.htmlLink
为undefined
。我可能在var event
?