I have registered push notifications. Updates and creations work just fine, but I am not able to receive deleted events.
I am setting the channel like this
public function setUpPushNotificationsChannel($lengthHours = 168){
$this->cancelPushNotificationsChannel();
$channel = new Google_Service_Calendar_Channel();
$channel->setId(create_guid());
$channel->setType('web_hook');
$channel->setAddress( $this->url);
$channel->setToken(Utils::encrypt($this->pushSecret);
$dateTime = new DateTime();
$dateTime->add(date_interval_create_from_date_string("$lengthHours hours"));
//timestamp is in milliseconds for google -.-
$channel->setExpiration($dateTime->getTimestamp() * 1000);
//this does not do anything
$optParams = array(
'singleEvents' => true,
'showDeleted' =>true,
);
$channel = $this->service->events->watch($this->getGoogleCalendarId(),$channel,$optParams);
$this->gcalendarSetting->gcalendar_push_channel_id_c = $channel->getId();
$this->gcalendarSetting->gcalendar_resource_id_c = $channel->getResourceId();
$this->gcalendarSetting->save();
}
I could not find anything in the google doc, maybe I am missing some parameter for deleted events? Thanks