Thanks Ryan,
This is the error i get back when i try to create an event. Ive i
leave the $URL empty the function works fine.
**
Uncaught exception 'Zend_Gdata_App_HttpException' with message
'Expected response code 200, got 400' in /home/mtnc/public_html/qbweb/
Zend/Gdata/App.php:468
Stack trace:
#0 /home/mtnc/public_html/qbweb/Zend/Gdata/App.php(663):
Zend_Gdata_App->post(Object(Zend_Gdata_Calendar_EventEntry),
'http://www.goog...')
#1 /home/mtnc/public_html/qbweb/Zend/Gdata/Calendar.php(156):
Zend_Gdata_App->insertEntry(Object(Zend_Gdata_Calendar_EventEntry),
'http://www.goog...', 'Zend_Gdata_Cale...')
#2 /home/mtnc/public_html/qbweb/caltest.php(87): Zend_Gdata_Calendar-
>insertEvent(Object(Zend_Gdata_Calendar_EventEntry), 'http://
www.goog...')
#3 /home/mtnc/public_html/qbweb/caltest.php(42):
createEvent(Object(Zend_Http_Client), '', '', '', '', '', '', '', '',
'http://www.goog...')
#4 {main}
thrown in <b>/home/mtnc/public_html/qbweb/Zend/Gdata/App.php</b> on
line <b>468</b><br />
**
This is the data i am passing createQuickAddEvent ($client ,
$ourCalUrl,'WO Test at Jun 2, 2008 8:00am - Jun 6, 2008 5:00pm');
and this is the function i am using.
function createQuickAddEvent ($client, $url, $quickAddText) {
$gdataCal = new Zend_Gdata_Calendar($client);
$event = $gdataCal->newEventEntry();
$event->content = $gdataCal->newContent($quickAddText);
$event->quickAdd = $gdataCal->newQuickAdd(true);
$newEvent = $gdataCal->insertEvent($event,$url);
return $newEvent->id->text;
}
Thanks in advance
stephen
On Jun 3, 2:06 am, "Ryan Boyd (Google)" <[EMAIL PROTECTED]> wrote:
> Hi Stephen,
>
> On Jun 2, 9:55 pm, Stephen <[EMAIL PROTECTED]> wrote:
>
> > Thank You Ray, i am getting closer with my problem. I modified the
> > Zend functions to now send the URL.
>
> This should work for you:
> $ourCalUrl = $calendar->getSelfLink()->getHref() . '/private/full';
>
> Cheers,
> -Ryan
>
> > What do I use as the calendar URL. I have tried
>
> > if ($calendar->title->text == $ourCal)
> > {
> > $ourCalUrl = explode('$calendar->id;
> > }
> > and
> > if ($calendar->title->text == $ourCal)
> > {
> > $ourCalUrl = explode('/',$calendar->id);
> > $ourCalUrl = 'http://www.google.com/calendar/feeds/'.
> > $ourCalUrl[6] . '/private/full';
> > }
>
> > but both trow errors.
>
> > Any help will be appreciated.
>
> > thank you
> > stephen
>
> > On Jun 2, 12:58 pm, Ray Baxter <[EMAIL PROTECTED]> wrote:
>
> > > On Jun 1, 2008, at 9:50 PM, Stephen wrote:
>
> > > > I am using Zend's PHP gdata framework. I am able to create calendar
> > > > events which is great, but i cannot seem to figure out create a
> > > > calendar event in another calendar. I already have the calendar URL
> > > > and looking at the documentation i have to change the post URL. If
> > > > this is correct i just need to be able to do it on with the Zend
> > > > Framework
>
> > > To insert an event in a calendar other than the default when using
> > > Zend framework, you need to pass the uri of that other calendar to
> > > insertEvent:
>
> > > $newEvent = $gdataCal->insertEvent($event, $uri);
>
> > >http://framework.zend.com/apidoc/core/Zend_Gdata/Zend_Gdata_Calendar....
>
> > > Ray
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---