I have seen some other questions/answers about this, too, but am still
running into trouble myself.

I am trying to work with non-primary calendars for google apps domains
(i.e www.mydomain.com).  That is, assume [email protected] has a
calendar associated with that email (his primary calendar), and he
wants to use app engine to retrieve, create and update events and
calendars other that that primary calendar.

Assuming you have retrieved/created such a calendar called cal:

cal.GetEditLink().href returns something like:

caluri = 
http://www.google.com/calendar/feeds/default/owncalendars/full/mydomain.com_<key>%40group.calendar.google.com

where <key> is the specific key for the given calendar...

I want to know what your uri should like to do an InsertEvent().....

Here is what I have discovered about what uri works/doesn't work for
other operations, based on modifying the functions demonstrated in
calendarExample.py AND assuming you have appropriate log-in
credentials (like the programmatic login of calendarExample.py).

(1) Retrieving the calendar

Calendars can by directly retrieved (assuming proper authorization
tokens) via that id:

calendar_entry = self.cal_client.GetCalendarListEntry(caluri)

Where self is a class CalendarExample object.  So no difference here
vs. non-hosted domains.

(2) Querying the calendar

I have discovered via trial and error that the feed uri you need to
query this calendar should look like:

queryuri = mydomain.com_<key>@group.calendar.google.com


You use this in

query = gdata.calendar.service.CalendarEventQuery(queryuri, 'private',
'full')

and then build your various query parameters

(3) Embedding your calendar on your webpage

The embed code looks something like:

<iframe src="http://www.google.com/calendar/hosted/mydomain.com/embed?
src=<embeduri>&ctz=America/Los_Angeles" style="border: 0" width="800"
height="600" frameborder="0" scrolling="no"></iframe>

where embeduri is the queryuri without the %xx escapes.

<embeduri> = mydomain.com_<key>%40group.calendar.google.com


(4) Inserting events to this calendar

Following the suggestions of this discussion group at:

http://groups.google.com/group/google-calendar-help-dataapi/browse_thread/thread/af19b6cdf9d1ee87/df8fa635d968bab9?lnk=gst&q=uri+for+insert+event#df8fa635d968bab9

I have tried to build a uri to be used in a InsertEvent like the
following:

inserturi= /calendar/feeds/default/owncalendars/full/
mydomain.com_<key>@group.calendar.google.com/private/full

So basically your queruri prefixed by "/calendar/feeds/default/
owncalendars/full/" and suffixed by "/private/full".  This, however,
returns:

RequestError: {'status': 400, 'body': 'Invalid request URI', 'reason':
''}



The query, embed and full (cal) uris don't work, either.  I am
guessing something with the suffix or prefix is awry, but haven't
found it online nor found a solution myself.  Anyone have any ideas?
Also, I hope I saved someone out there some time with the embed and
queryuris.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to