Hi All,
I'm having a spot of bother migrating an app to the new v3 Google
calendar API. The documentation available for google-api-php-client
seems rather minimal, so I wonder if someone can spot an issue with my
code below...
I have the app oauth authenticating, and I can get information out of
the calendar using listEvents calls etc. What I can't do is insert a new
event.
$calendarid = 'my calendar id';
$cal = new apiCalendarService($client);
$event = new Event();
$event->setSummary('My Event Name');
$start = new EventDateTime();
$start->setDateTime('2012-04-04 10:00:00.000+12:00');
$start->setTimeZone('Pacific/Auckland');
$event->setStart($start);
$end = new EventDateTime();
$end->setDateTime('2011-04-18 11:00:00.000+12:00');
$end->setTimeZone('Pacific/Auckland');
$event->setEnd($end);
$createdEvent = $cal->events->insert($calendarid, $event);
This generates a generic "400 bad request" error with no additional info
about what the problem might be.
Is anyone able to let me know what might be wrong with my code above, or
let me know how to go about debugging this "bad request"error? I'd quite
like to keep using the google-api-php-client if I can, but there seems
to be a lot more documentation available if you are crafting the
requests manually so this may be the better way to go. I'd wecome advice
on that too.
Thanks,
Harvey.
--
Harvey Kane
Phone:
- Auckland: +64 9 950 4133
- Wanaka: +64 3 746 8133
- Mobile: +64 21 811 951
Email: [email protected]
If you need to contact me urgently, please read my email policy
www.ragepank.com/email/
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]