0
여러 일정을 Google 캘린더에 일괄 추가 할 수 있지만 기본 캘린더에만 적용됩니다. URL을 가지고있는 다른 캘린더에서 동일한 코드를 사용하려면 어떻게해야합니까?Python Google 캘린더 API 문제
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을 사용할 수 있었던 점에 유의하시기 바랍니다. 이 부분 URL를 해결하기 위해 노력하고있다처럼 코드에서
DEFAULT_BATCH_URL = 'http://www.google.com/calendar/feeds/default/private/full/batch'
, 그것은 같습니다
이것은 거의 완전한 해결책이었습니다. 나는 URL의 끝 부분에/batch를 추가해야만했다. – bs7280
아아, 잡았다 - 나중에 참조 할 수 있도록이 솔루션을 추가 할 것이다. 다행 했어. – RocketDonkey