Dany3l
Dany3l

Reputation: 1

search Google Calendar extendedProperties

I have the following problem when doing a privateExtendedProperty search

$service = new Google_CalendarService($client);
$extendedProperties = New Google_EventExtendedProperties();

$param = array();
$param['singleEvents'] = false;
$param['extendedProperties'] = "CodeID=66";

$events = $service->events->listEvents($calendarioId,$param);

Fatal error: Uncaught exception 'Google_Exception' with message '(list) unknown parameter: 'extendedProperties'' in ..\google\service\Google_ServiceResource.php:111 Stack trace: #0 ...\includes\google\contrib\Google_CalendarService.php(529): Google_ServiceResource->__call('list', Array) #1 ...\google_calendario.php(198): Google_EventsServiceResource->listEvents('hude3h3fjolua08...', Array) #2 ..\google_calendario.php(442): c_googlecalendario->proc_google('hude3h3fjolua08...', '66')

Upvotes: 0

Views: 1016

Answers (1)

Jinzhao Huo
Jinzhao Huo

Reputation: 857

With the latest api on github you can do this:

$events = $service->events->listEvents($calendarId, array('privateExtendedProperty'=>'codeID='.$yourId));

Pay attention that it's either privateExtendedProperty or sharedExtendedProperty depending on how you created the event.

Upvotes: 1

Related Questions