如何通过Python在Google日历中设置受邀者?

时间:2010-05-22 09:45:26

标签: python google-apps

我正在通过python命令设置Google日历

def _InsertQuickAddEvent(self, 
  content="Tennis with dddddd on 5/19/2010 4am-5:30am"):
"""Creates an event with the quick_add property set to true so the content
is processed as quick add content instead of as an event description."""
event = gdata.calendar.CalendarEventEntry()
who = whois("himanshu.sojitra@searce.com")
event.content = atom.Content(text=content)
event.quick_add = gdata.calendar.QuickAdd(value='true');    
new_event = self.cal_client.InsertEvent(event, 
    '/calendar/feeds/default/private/full')
return new_event

此代码由Google API提供 任何人都可以建议如何添加被邀请者吗? 重要的链接 http://code.google.com/apis/calendar/data/1.0/developers_guide_python.html

1 个答案:

答案 0 :(得分:0)

我接受了很多研究......

event_audit=gdata.calendar.AttendeeStatus("http://schemas.google.com/g/2005#event.invited")
event.who.append(gdata.calendar.Who(email="xyz@pqr.com",rel="http://schemas.google.com/g/2005#event.invited"))