I am trying to make a privet application with php on zend google data api. I need to create events from a script. The problem I am facing is, I cannot add guest/attendee/participant from the script on the event. Actually I couldn’t find the correct parameter.
The function I am using:
function createEvent ($client, $title = 'Tennis with Beth',
$desc='Meet for a quick lesson', $where = 'On the courts',
$startDate = '2008-01-20', $startTime = '10:00',
$endDate = '2008-01-20', $endTime = '11:00', $tzOffset = '-08')
{
$gdataCal = new Zend_Gdata_Calendar($client);
$newEvent = $gdataCal->newEventEntry();
$newEvent->title = $gdataCal->newTitle($title);
$newEvent->where = array($gdataCal->newWhere($where));
$newEvent->content = $gdataCal->newContent("$desc");
$when = $gdataCal->newWhen();
$when->startTime = "{$startDate}T{$startTime}:00.000{$tzOffset}:00";
$when->endTime = "{$endDate}T{$endTime}:00.000{$tzOffset}:00";
$newEvent->when = array($when);
// Upload the event to the calendar server
// A copy of the event as it is recorded on the server is returned
$createdEvent = $gdataCal->insertEvent($newEvent);
return $createdEvent->id->text;
}
I tried to add it by $newEvent->guests,$newEvent->attendees, $newEvent->Participants.
Anybody know the way?
Also it will be helpful if you can also tell me how to choose a calendar with id instead of the primary calendar. Thanks in advance.
You can set this using the following code :-