Hi Ben,

Calendar creation is not yet supported directly through the Zend GData
Client Library at the moment.  But there is a way to leverage the
lower level calls from the Zend library to create calendar with raw
XML. The following demonstrate how this can be done:

1) create a XML file with the following content (you might change the
color or timezone accordinly):

<entry xmlns='http://www.w3.org/2005/Atom'
       xmlns:gd='http://schemas.google.com/g/2005'
       xmlns:gCal='http://schemas.google.com/gCal/2005'>
  <title type='text'>[TITLE]</title>
  <summary type='text'>[SUMMARY]</summary>
  <gCal:timezone value='America/Los_Angeles'></gCal:timezone>
  <gCal:hidden value='false'></gCal:hidden>
  <gCal:color value='#2952A3'></gCal:color>
  <gd:where rel='' label='' valueString='Oakland'></gd:where>
</entry>

2) use the following code to create a new calendar:

    $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
    $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass,
$service);
    $gdataCal = new Zend_Gdata_Calendar($client);
    $title = 'My New Calendar';
    $summary = 'blah';
    $uri = 'http://www.google.com/calendar/feeds/default/owncalendars/
full';
    $xml = file_get_contents('createcal.xml');
    $xml = str_replace('[TITLE]', $title, $xml);
    $xml = str_replace('[SUMMARY]', $summary, $xml);
    $gdataCal->post($xml, $uri);

hope it helps,
Austin

On Nov 5, 12:02 am, Ben <[EMAIL PROTECTED]> wrote:
> I have followed the steps in Zend Gdata Calendar document.
> I can output the calendar list.
> But it is found that there is no steps to create a new calendar in
> Zend Gdata Calendar document.
>
> Are there anybody kindly tell how to do it?
>
> Many Thanks


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to