Simon Davies
Simon Davies

Reputation: 3686

Google Calendar Javascript API listing ALL events from ALL calendars

I can list a selected calendar events by adding the calendarID to the script:

   var request = gapi.client.calendar.events.list({ 
       'calendarId': 'primary'
    }); 

this gets the primary calendar and by swopping out the 'primary' to the calendar id required

   'calendarId': '[email protected]'

But what I would like to do is list ALL events from ALL calendars, so is there away to do this like below for EG:

    'calendarId': 'ALL'

Upvotes: 5

Views: 6258

Answers (1)

abraham
abraham

Reputation: 47833

primary is the only special value that the documentation specifies. If the Calendar API does support such a special value, it is not publicly supported, and could be removed or changed at any time.

Your best option is to the calendar.calendarList.list method to get a list of all the users calendars and list the events from each one.

Upvotes: 7

Related Questions