Hello all,
I've been working the create event call using the python client api
and I noticed something strange and have some questions. Here's the
code and the result:
nonsensicalEvent = 'otigleedinglodinglodin'
quickAddEvent = {'quickAddEventData':nonsensicalEvent}
#quickAddEvent = {'quickAddEventData':'lunch with John at "Taco
Tuesdays" Monday 12 pm'}
#quickAddEvent = {'quickAddEventData':'Tennis with Roger Federer
June 21 3pm-5:15pm'}
test_aerioQuickAddEvent(quickAddEvent, reusableToken)
When I run the uncommented portion above (btw, the others work fine),
I actually got an event for the current day at 9:14am
otigleedinglodinglodin
So my questions:
1. What's the 'default' behavior on an event that doesn't specify a
true 'When' and why did I get an event at 9:14 (by the way, that was
about the time I ran the program - so will it always create an event
right now?)
2. Is there a concept of an invalid event? If so can I see an example?
I'd like to try to exercise exceptional conditions. 2b. Also, as I'm
new to the gdata api, is there a document that goes into various
example exceptional conditions for all the calendar services? I've
already looked at the code:
On failure, a RequestError is raised of the form:
{'status': HTTP status code from server,
'reason': HTTP reason from the server,
'body': HTTP body of the server's response}
But is there more documentation available on this?
Thanks all. You can skip the following question but just in case:
Is this a good way of handling exceptions in general?
try:
# Send the request and receive the response:
logging.debug('aerioQuickAddEvent-About to add quick add
event (calling gdata feed)')
new_event = calendar_service.InsertEvent(event, '/calendar/
feeds/default/private/full')
except RequestError, request_error:
# They aren't logged in?
if request_error[0]['status'] == 401:
logging.debug('aerioQuickAddEvent-401 error: %s ' %
(str(request_error[0])))
else:
logging.debug('aerioQuickAddEvent-Error: %s ' %
(str(request_error[0])))
return {'addedEvent':'Error (see log files)'}
else:
# We only get here if we pass the try
return {'addedEvent':'True'}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---