10

我正在学习如何访问用于创建和访问事件的Google日历API。我正在尝试使用OAuth 2.0 Playground了解API。我正在努力为calendarid和eventid设置什么Google Calendar API日历ID和事件ID

https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventId} 

任何人都可以指导我。

问候, Sureshkumar梅农

+0

您是否收到错误? – 2013-04-29 18:36:57

回答

15

calendarId是日历的电子邮件地址。如果你只是使用你自己的,然后使用字符串“主”。

eventId是您要修改的事件的ID。如果你没有事件,你应该使用'insert'调用创建一个,这个调用将包含一个eventId参数,你可以存储这个参数并在稍后修改它,或者使用'list'调用来获取事件。

+1

感谢提示 – 2013-04-30 11:57:15

2

我面临着类似的问题,得到了解决,找到日历事件ID:

->Go to the event debugging URL at https://www.google.com/calendar/render?gsessionid=OK&eventdeb=1 . 
->Double click to view the affected event. 
->Select the drop down menu 'More Actions'. 
->Click on the 'Troubleshooting Info'. 
->Copy the text that appears and paste it in your reply to support.

您可以参考下面的链接,给出了屏幕的细节拍摄
http://googleappstroubleshootinghelp.blogspot.in/2012/09/how-to-find-troubleshooting-information.html
但是我仍然在寻找一个解决方案动态获取事件ID。

+0

谢谢,在提供了我的API开始工作后,调试URL提供了正确的事件ID。 – 2014-05-27 11:23:00

0

我只是发现检索所有事件列表的列表请求包含正确的事件ID。在我的网络应用程序中,我使用的是fullcalendar,每次单击事件进行更新或删除时,eventclicked方法都会提供一个错误的事件ID。所以,我想我们将不得不提供存储在我们本地应用中的真实事件ID和假事件ID地图。这可以是一个解决方法。但它喜欢吃苍蝇。

+0

忘记了上面的答案,这是一个愚蠢的答案。只需使用列表请求将所有事件检索到您的本地应用程序,即可获得与您的事件ID相关的信息。 – 2015-03-24 14:45:16

相关问题