Open supreetSekhon opened 2 years ago
I created a function to update the event but it is not working. Following is the code I added in GoogleCalendarApi.php. Please hlep me out and let me know what am I doing wrong. I would really appreciate some help
public function updateGoogleCalendarEvent($event,$eventId){ if ($this->checkIfCredentialFileExists() ) { if( $this->is_connected()){ try{ $this->checkAccessToken(); $service = new Google_Service_Calendar($this->client); $calendarId = $this->calendarId; $event = new Google_Service_Calendar_Event(array( 'summary' => $event['summary'], 'location' => $event['location'], 'description' => $event['description'], 'start' =>$event['start'], 'end' => $event['end'], 'recurrence'=>$event['recurrence'], 'attendees' => $event['attendees'], 'reminders' => $event['reminders'] )); $opt_params = array( 'sendUpdates' => 'all' ); return $service->events->update($calendarId,$eventId,$event,$opt_params); }catch (Google_Service_Exception $e){ echo $e->getMessage(); } }else{ return false; } } return false; }
I created a function to update the event but it is not working. Following is the code I added in GoogleCalendarApi.php. Please hlep me out and let me know what am I doing wrong. I would really appreciate some help