I am trying to write an application that can add events to a Google calendar.
This is a really great site that allows you to play with the API.
http://code.google.com/apis/explorer/#_s=calendar&_v=v3&_m=events.insert
Using this site, I was able to build a calendar event using the following things. I'm having difficulty translating this into Python. Assuming I have already authenticated with oauth, how can I do this with Python code? It seems like I should build a JSON string and somehow turn this into an HTTP request. I have no idea how to do this.
Can someone give an example of how to do the same with the Python API?
Many thanks!
POST
https://www.googleapis.com/calendar/v3/calendars/my_calendar_id_string/events?pp=1&key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.ANOTHERBIGSLONGTRINGHEREFfxCTiKMIR_bDui
X-JavaScript-User-Agent: Google APIs Explorer
{
"start": {
"dateTime": "2012-05-24T14:00:00-06:00"
},
"end": {
"dateTime": "2012-05-24T18:00:00-06:00"
},
"description": "My Description"
}