缺少结束时间的Google日历 [英] Missing End Time Google Calendar
本文介绍了缺少结束时间的Google日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的Google日历请求。在响应中,错误代码是缺少结束时间。我试图使这种动态,所以我最终将删除硬编码的开始和结束日期时间。
var object = {
end:{
'dateTime':2014-07-28T23:00:00,//结束,
timeZone:timeZone
},
start:{
'dateTime':2014-07-28T18:00:00,//开始,
timeZone:timeZone
},
calendarId:calendarId,
摘要:艺术家,
描述:描述,
位置:地址
};
var request = gapi.client.calendar.events.insert(object);
解决方案
这家伙有答案。
$ b
https:// groups.google.com/forum/#!msg/google-calendar-api/cnkgXfy_GQQ/SRV1N0TAGtYJ
var object = {
'end':{
'dateTime':'2014-07-28T23:00:00',//结束,
'timeZone':timeZone
} ,
'start':{
'dateTime':'2014-07-28T18:00:00',//开始,
'timeZone':timeZone
}
//'summary':artist,
//'description':description,
//'location':address
};
var calendarObject =
{
'calendarId':calendarId,
'resource':object
};
var request = gapi.client.calendar.events.insert(calendarObject);
Here is my google calendar request. In the response, the error code is "Missing End Time." I'm trying to make this dynamic, so I will end up removing the hard coded start and end dateTimes.
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);
解决方案
This guy had the answer
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);
这篇关于缺少结束时间的Google日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文