0

Our scientists reserve time on 100 google calendars, which correspond to 100 scientific instruments at our laboratory. I display combined events for a scientist from all 100 calendars and display his/her events on a web page, so that the user can see at a glance upcoming reservations. I retrieve the users events from all 100 calendars by invoking EventsResource.CalendarService.Events.List(calendarId) per each calendar, but doing this 100 times is slow.

Is there a faster way to retrieve a particular user's events across multiple calendars without making a call-per-calendar as I do now? I realize I can embed the google calendar via iframe with multiple src's, but this UI calls for a tabular list and making a function call is more flexible than the embedded google iframe calendar.

Julius Seizure
  • 327
  • 3
  • 9

1 Answers1

0

If the user is creating the events, are the events showing on the user's calendar? If so, you can just retrieve events from the user's calendar, not each individual instrument calendar. If not, can you provide more details about how the events are being created, who owns them and who is invited?

Jay Lee
  • 13,415
  • 3
  • 28
  • 59
  • Our website uses a Service Account to create the calendar events on behalf of the user. Since the user is an attendee, the events show up on the user's calendar too. Looping through the user's personal calendar would not pick up the event, as the event was created on one of the 100 calendars that correspond to the 100 scientific instruments. I appreciate the help, but I suspect Google would need to add another api function to find all events (across all calendars) by user. – Julius Seizure Feb 25 '14 at 23:37
  • Your statements seem to conflict each other. If the service account invites the user then the event is on the user's calendar and you can get all events by retrieving the user's calendar. It might help if you showed the event attendees as created or some of your code. – Jay Lee Feb 25 '14 at 23:53