3

I have multiple google calendar and I want to add watch on calendars in single request. Is this possible?

Right now I am doing this thing in loop:

foreach($calendar_resources as $key => $value)
{   
     $channelID = "xxxx-".  date('His',  time()); 
     $channel->setId($channelID);
     $watchEvent = $cal->events->watch($value, $channel);                   
     var_dump($watchEvent); 

}
Simon H
  • 2,495
  • 4
  • 30
  • 38
Vipin Sharma
  • 421
  • 5
  • 24
  • Try to check this [batch request](https://developers.google.com/google-apps/calendar/batch) if it is applicable in your situation. Instead of sending each call separately, you can group them together into a single HTTP request. You can even group requests for multiple users or multiple Google APIs. Just check the documentation link above to know more about it and for the example request and response. For more information, check this [SO question](http://stackoverflow.com/questions/17840333/google-calendar-api-batch-request-php) that use Google Calendar API batch request for PHP. – KENdi Sep 21 '16 at 08:43

0 Answers0