I don't know if this will help but this is a portion of a script I use
to get all events for one day based on the start date that is passed
to the script.  Of course the real calendar id, email, and password
have been edited.  you need to log in to your google calendar site and
go to settings to get the id for a particular calendar.  From what I
read you can't use the default/primary calendar with this. see where
'query' is set and then where it is used in the feed =  statement.

Hope this helps
Thomas

import gdata.calendar.service
import time
import string

"""This gets all the events for one day"""

def get_info_from_some_google_calendar(self,start_date):

 
calendar_id='my.domain.here_3c44hogduoa0g6dhcc0689gx...@group.calendar.google.com'
  calendar_service = gdata.calendar.service.CalendarService()
  calendar_service.email = '[email protected]'
  calendar_service.password = 'password_here'
  calendar_service.source = 'my great calendar'  #Title must match
Google Calendar Title
  calendar_service.ProgrammaticLogin()

"""Do some other stuff here like set sd1=start time and ed to endtime
using start_date, for my case that is 24 hours"""

  query = gdata.calendar.service.CalendarEventQuery
('my.domain.here_3c44hogduoa0g6dhcc0689gx...@group.calendar.google.com',
'private', 'full')
  query.start_min = sd1
  query.start_max = ed
  feed = calendar_service.CalendarQuery(query)
  for i, an_event in enumerate(feed.entry):
    for a_when in an_event.when:
      title=an_event.title.text
      datestring=a_when.start_time[0:-19]
      timestring=a_when.start_time[11:-13]
      if timestring=='':
        b = 'All Day'
      else:
        b = time.strptime(timestring, "%H:%M")
        c = time.strptime(datestring,"%Y-%m-%d")
      if timestring=='':
        newinfo = '<tr><td>%s</td><td>%s %s</td></tr>'%
(start_date,b,title)
      else:
        newinfo = '<tr><td>%s</td><td>%s %s</td></tr>'%(time.strftime
("%A %b %d",c),time.strftime("%I:%M %p",b),title)
      my_info=my_info+newinfo

  my_info=my_info+'</table>'
  return my_info

On Jan 7, 2:25 pm, Azound <[email protected]> wrote:
> where do you specify the calendar id for your query?
>
> On Jan 7, 5:00 am, florent devin <[email protected]> wrote:
>
>
>
> > For some reason Google limits the results returned by a request to a limit.
> > You can overcome this by doing :
> > in Java, this can be done by :  myQuery.setMaxResults(1000);
>
> > I do not see why you do succeed in access to a non primary calender. The
> > only thing I see is that you do not have the permission to access.
> > Second way to
>
> > 2010/1/7 Azound <[email protected]>
>
> > > I currently get my calendar event feed through the python api's
> > > GetCalendarEventFeed(url) api, where url is '/calendar/feeds/
> > > <calendar_id>/private/full'.  Unfortunately, this function doesn't let
> > > me specify max_results, so the number of events returned is limited to
> > > the default (25, I believe).
>
> > > It looks like in order to get more events, I need to construct a
> > > CalendarEventQuery, and then call CalenderQuery on my CalendarService
> > > ().  This is all well and good, except I don't know how to specify a
> > > non-primary calendar for the query (I can't find a calendar_id
> > > parameter, or url parameter to pass this information).  Is there
> > > something I'm missing?  How can I get the entire feed for a non-
> > > primary calendar?
>
> > > Thanks!
>
> > > P.S. Is it possible to do something like call GetCalendarEventFeed in
> > > a loop to get all the events?
>
> > > --
> > > 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]<google-calendar-h­elp-dataapi%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-calendar-help-dataapi?hl=en.
>
> > --
> > Florent Devin
-- 
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