开发者

Adding calendar event to specific calendar

At google accounts I have several calendars, managed ma开发者_JS百科nually, for instance: meeting plan, maintenance plan. This calendars I've created using one account and querying them but google api is successful.

But now I want to use gdata api to manage calendars. I want to insert event in calendars which are not my default calendars.

documentation says that a have to add event to url

POST https://www.google.com/calendar/feeds/default/private/full

And it works, but inserts in my primary calendar (named after my hosted login name).


This question has been asked before but I can't find the specific post. I had this problem a few months ago and the solution is in specifying the url of the specific calendar. Are you using the python API?

service = gdata.calendar.service.CalendarService()
calendar = gdata.calendar.CalendarListEntry()
event = gdata.calendar.CalendarEventEntry()
#here you login, edit the event, and insert the calendar into the service
url = calendar.content.src
service.InsertEvent(event, url)

I did all that very briefly since I am unaware of your specifics, but the full documentation on the various functions listed above are in the gdata documentation. The important part is finding the url and using it in service.InsertEvent()

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜