Google Calendar Retrieve Events for Additional Calendars
I’ve been experimenting with an idea that mergers Remember the Milk (RTM) and Google Calendar. Problem is, their APIs are a bit less documented than I originally expected. No matter, the internet to the rescue!
Google calendar provides some pretty neat examples for how to login and retrieve all the events on your default calendar, but neglects to mention additional private calendars under your account. The distinction, which isn’t documented, is that when you create additional calendars they are not actually assigned your username but instead get a unique username so they can migrate between user accounts. Secondly, while you can authenticate yourself for private events on your own calendar, you can’t authenticate against this new username. This has two implications:
1) Username/password authentication won’t work (we’ll use magic cookie).
2) The private event feed requires a unique key.
Thus what was formerly:
Becomes:
As far as I can tell, the private key can only be accessed from within the “Calendar Properties” inside of Google Calendar. Additionally, if you copy and paste the result, you will end up with an HTML-escaped @ (%40). Be sure to replace this with an @, otherwise you’ll get an invalid user ID.
Hopefully this helps! Comment with any questions and I’ll try to answer them.