这是我的谷歌日历请求。在响应中,错误代码是“缺少结束时间”。我试图让它动态化,所以我最终会删除硬编码的开始和结束日期时间。
var object = {
"end": {
'dateTime': "2014-07-28T23:00:00",//end,
"timeZone": timeZone
},
"start": {
'dateTime': "2014-07-28T18:00:00",//start,
"timeZone": timeZone
},
"calendarId": calendarId,
"summary": artist,
"description": description,
"location": address
};
var request = gapi.client.calendar.events.insert(object);
最佳答案
这个人有答案
https://groups.google.com/forum/#!msg/google-calendar-api/cnkgXfy_GQQ/SRV1N0TAGtYJ
var object = {
'end': {
'dateTime': '2014-07-28T23:00:00',//end,
'timeZone': timeZone
},
'start': {
'dateTime': '2014-07-28T18:00:00',//start,
'timeZone': timeZone
}
//'summary': artist,
//'description': description,
//'location': address
};
var calendarObject =
{
'calendarId': calendarId,
'resource': object
};
var request = gapi.client.calendar.events.insert(calendarObject);
关于javascript - 缺少结束时间谷歌日历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24990486/