Is there something wrong with the following XML? When I post it, I get
a 201 response but there is only 1 event created and it is totally
blank with the date/time as the time of creation.

<feed xmlns='http://www.w3.org/2005/Atom'
      xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:gCal='http://schemas.google.com/gCal/2005'
      xmlns:gd='http://schemas.google.com/g/2005'>
<entry>
  <batch:id>id1</batch:id>
  <batch:operation type='insert' />
  <title type='text'>my title 1</title>
  <content type='text'>my content 1</content>
  <gd:recurrence>DTSTART;VALUE=DATE:20080913
RRULE:FREQ=YEARLY;UNTIL=20110913
</gd:recurrence>
</entry>
<entry>
  <batch:id>id2</batch:id>
  <batch:operation type='insert' />
  <title type='text'>my title 2</title>
  <content type='text'>my content2</content>
  <gd:recurrence>DTSTART;VALUE=DATE:20080223
RRULE:FREQ=YEARLY;UNTIL=20110223
</gd:recurrence>
</entry>
</feed>

Any ideas about what might be going on?

Thanks!

On Oct 24, 2:21 pm, "Austin (Google)" <[EMAIL PROTECTED]> wrote:
> Hi Patrick,
>
> The PHP client library has the infrastructure to providebatch
> request, it's just that you need to build up the raw XML for thebatch
> request.
>
> This is a simple snippet demonstrate how this can be done:
>
> 1) create a XML file with all yourbatchrequest entries, and save it
> as batchrequest.xml -
>
> <feed
> xmlns='http://www.w3.org/2005/Atom'xmlns:batch='http://
> schemas.google.com/gdata/batch'
> xmlns:gCal='http://schemas.google.com/gCal/2005'
> xmlns:gd='http://schemas.google.com/g/2005'>
> <entry>
>   <batch:id>itemA</batch:id>
>   <batch:operation type="insert"/>
>   <title type="text">itemA</title>
>   <content type="text">...blah...</content>
>   <gd:when startTime="2007-10-24T10:00:00.000-07:00"
> endTime="2007-10-24T12:00:00.000-07:00">
>   <gd:reminder/>
>   </gd:when>
>   <gd:where valueString="here"/>
> </entry>
> <entry>
>   <batch:id>itemA</batch:id>
>   <batch:operation type="insert"/>
>   <title type="text">itemB</title>
>   <content type="text">...blah...</content>
>   <gd:when startTime="2007-10-25T10:00:00.000-07:00"
> endTime="2007-10-25T12:00:00.000-07:00">
>   <gd:reminder/>
>   </gd:when>
>   <gd:where valueString="here"/>
> </entry>
> </feed>
>
> 2) Read in this XML file and post it to thebatchrequest URI for the
> calendar, ie -
>
>   $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
>   $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass,
> $service);
>   $gdataCal = new Zend_Gdata_Calendar($client);
>   $uri = 'http://www.google.com/calendar/feeds/default/private/full/batch';
>   $batchContent = file_get_contents('batchrequest.xml');
>   $gdataCal->post($batchContent, $uri);
>
> For more information onbatchrequest protocol, please refer to this
> doc -
>
> http://code.google.com/apis/gdata/batch.html
>
> Hope it helps,
> Austin
>
> On Oct 24, 6:42 am, Patrick <[EMAIL PROTECTED]> wrote:
>
> > I'm guessing the library doesn't support it yet but has anyone
> > successfully donebatchprocessing using PHP?  If so, can you share
> > any information so I don't need to reinvent the wheel?


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