Closed GoogleCodeExporter closed 9 years ago
You may be hitting rate limiting for requests for the calendar discovery
document.
Try keeping a local copy of the discovery document and build the service object
from that copy:
http://code.google.com/p/google-api-python-client/wiki/NonStandardDiscoveryDocum
ents#Local_Discovery_Docs
The discovery document for calendar v3 is here:
https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest
Original comment by jcgregorio@google.com
on 7 Nov 2012 at 3:31
[deleted comment]
Thanx for pointing me in that direction, I've changed my code accordingly and
so far it's working, but is there any way for me to stress test that?
#Read local copy of api
f = file(os.path.join(os.path.dirname(__file__), "rest"), "r")
discovery = f.read()
f.close()
# Get the authorized Http object created by the decorator.
http = decorator.http()
# Construct a service from the local documents
service = build_from_document(discovery,
base="https://www.googleapis.com/",
http=http, developerKey='XXXXXXXXXXXX')
# Make a list of calendars
calendar_list = service.calendarList().list(minAccessRole="writer").execute()
Original comment by franke.r...@gmail.com
on 7 Nov 2012 at 3:52
Original issue reported on code.google.com by
franke.r...@gmail.com
on 7 Nov 2012 at 1:05