2011-04-07 3 views
3

Google의 gdata 라이브러리를 사용하여 프로그래밍 방식으로 파이썬으로 캘린더 이벤트를 만듭니다.gdata 파이썬 라이브러리를 사용하여 Google 캘린더 이벤트 초대 알림 보내기

나는 내 인생 그것이이 초대에 통지를 초대 보내기 위해서는 (또는 초대의 목록) 할 수 없습니다 : 지금까지 다음 코드는 한 가지를 제외하고 잘 작동됩니다

import datetime 
import atom 
import gdata.calendar.service 
from gdata.calendar import Who, Where, When 

entry = gdata.calendar.CalendarEventEntry() 
entry.title = atom.Title(text = 'event-title') 
entry.content = atom.Content(text = 'some event etc...') 
entry.send_event_notifications = atom.Entry(text = 'true') #<<<<<<<<<<<<<<<<< 
start = datetime.datetime.now().isoformat() 
entry.when.append(When(start_time=start)) 
entry.where.append(Where(value_string='somewhere')) 
entry.who.append(Who(email = '[email protected]')) 
client = gdata.calendar.service.CalendarService(email='[email protected]', password='pa$$word') 
client.ProgrammaticLogin() 
event = client.InsertEvent(entry,'http://www.google.com/calendar/feeds/default/private/full') 

표시된 줄은 초대 알림을 보내는 데 필요하다고 생각되지만 작동하지 않습니다. 어떤 아이디어?

답변

0

당신은 사용할 수 있습니다 :

from gdata.calendar import SendEventNotifications 

# [...] stuff 

entry.send_event_notifications = SendEventNotifications(value='true') 
4

는 사실, 올바른 구문은 다음과 같습니다

from gdata.calendar.data import SendEventNotificationsProperty 

# [...] stuff 

entry.send_event_notifications = SendEventNotificationsProperty(value='true') 
관련 문제