Sunnysideup\GoogleCalendarInterface\GoogleCalendarInterface::addCalendarEvent
We add an event to the calendar.
The array that we pass to the method should be like this: array( 'summary' => 'Event name', 'location' => 'Event address', 'description' => 'Event description', 'start' => [ 'dateTime' => '2015-05-28T09:00:00', 'timeZone' => 'Pacific/Auckland' ], 'end' => [ '2015-05-28T17:00:00-07:00', 'timeZone' => Pacific/Auckland ], 'attendees' => array( array('email' => 'attendee1@example.com'), array('email' => 'attendee2@example.com'), ), 'reminders' => array( 'useDefault' => FALSE, 'overrides' => array( array('method' => 'email', 'minutes' => 24 * 60), array('method' => 'popup', 'minutes' => 10), ), ), ).
Signature
public function addCalendarEvent(array
$eventAttributes,
[string
$calendarID = 'primary'] )
Parameters
$eventAttributes
— array- Event attributes array
$calendarID
— string- CalendarID - lets you set the calendar if you don't want to use the primary calendar
Returns
- Google_Service_Calendar_Event