Hi,
I have the following code:
$client =
Zend_Gdata_ClientLogin::getHttpClient("[EMAIL PROTECTED]","PASSWORD","cl");
$gdataCal = new Zend_Gdata_Calendar($client);
$gdataCal->setUser($strId);
$gdataCal->setVisibility('private');
$gdataCal->setProjection('full');
$gdataCal->setOrderby('starttime');
$feed = $gdataCal->getCalendarFeed();
foreach($feed as $item)
{
// Some code to print out events from the selected
non-default
calendar... works!
}
Zend_Feed::registerNamespace('gd', 'http://schemas.google.com/g/
2005');
$newEntry = new Zend_Feed_EntryAtom();
$newEntry->id = $_REQUEST['calendar'];
$newEntry->title = trim("{$arrEventItem['name']} -
{$arrEventItem['id']}");
$newEntry->content = "My little content";
$newEntry->content['type'] = 'text';
$newEntry->{'gd:where'}['valueString'] = "my place";
$when = $newEntry->{'gd:when'};
$when['startTime'] = $gdataCal-
>formatTimestamp($arrEventItem['timestamp']);
$when['endTime'] = $gdataCal-
>formatTimestamp($arrEventItem['timestamp']);
$result = $gdataCal->post($newEntry->saveXML());
For some reason it adds the event to the default calendar, even though
the "$gdataCal->getCalendarFeed();" above correctly picks events from
the right calendar.
Anyone one who know what im missing? ;|
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---