0
gdata API for Pythonを使用すると、デフォルト以外のカレンダーでイベントを作成または一覧表示するにはどうすればよいですか?GoogleのAPI for Pythonを使用して、デフォルト以外のカレンダーに予定を作成/一覧表示するにはどうすればよいですか?
gdata API for Pythonを使用すると、デフォルト以外のカレンダーでイベントを作成または一覧表示するにはどうすればよいですか?GoogleのAPI for Pythonを使用して、デフォルト以外のカレンダーに予定を作成/一覧表示するにはどうすればよいですか?
読んで/書きたいカスタムカレンダーのURLを取得して、それをイベントクエリで指定する必要があります。これは私が思いついたものです:
#define cal_client:
self.cal_client = gdata.calendar.client.CalendarClient(source='Milosz-GCal-1.0')
#initiate calendar service (log in):
self.cal_client.ClientLogin(email, password, self.cal_client.source);
#get url for custom calendar (cal_index):
self.cal_url=self.cal_client.GetOwnCalendarsFeed().entry[self.cal_index].GetAlternateLink().href
#then, to read from the custom calendar:
self.feed=self.cal_client.GetCalendarEventFeed(self.cal_url)
#and to write to custom calendar:
new_event = self.cal_client.InsertEvent(event,self.cal_url)