我可以将多个事件批量添加到 Google 日历,但这仅在我的默认日历中。我如何能够获得相同的代码来使用我有 URL 的另一个日历?
request_feed = gdata.calendar.CalendarEventFeed()
# add events to the request_feed
request_feed.AddInsert(entry=InsertSingleEvent(calendar_service, "walk the dog at 4:00pm"))
request_feed.AddInsert(entry=InsertSingleEvent(calendar_service, "walk the cat at 5:00pm"))
response_feed = calendar_service.ExecuteBatch(request_feed,
gdata.calendar.service.DEFAULT_BATCH_URL))
这将正常工作,所有事件将立即出现在我的日历中。但是当我更换时:
response_feed = calendar_service.ExecuteBatch(request_feed,
gdata.calendar.service.DEFAULT_BATCH_URL))
和:
url = 'calendar/feeds/.../private/full'
response_feed = calendar_service.ExecuteBatch(request_feed,
url))
我收到错误:
gaierror: [Errno 11004] getaddrinfo failed
另请注意,我已经能够使用该 URL 自己添加事件。