I am having trouble using Zend_Gdata_Calendar
to return a subset of Google Calendar events with an exact phrase match.
The reference guide for Zend_Gdata_Books
, in the setQuery()
section, suggests this should be possible with Zend:
Note that any spaces, quotes or other punctuation in the parameter value must be URL-escaped (Use a plus (+) for a space). To search for an exact phrase, enclose the phrase in quotation marks. For example, to search for books matching the phrase "spy plane", set the
q
parameter to%22spy+plane%22
.
As far as I can tell, Zend_Gdata_Books
and Zend_Gdata_Calendar
extend the same setQuery()
function, so I figure they're equivalent on the Zend end of things.
As for Google, the Calendar query parameters reference says the Calendar API supports the standard Data API query parameters, which in turn says the full-text query string q
supports case-insensitive exact phrase searching, just as Zend_Gdata_Books
indicates.
I've tried it all these ways:
$gCal = new Zend_Gdata_Calendar();
$query = $gCal->newEventQuery();
$query->setQuery("%22event+text%22"); //no results
$query->setQuery("%22event%20text%22"); //no results
$query->setQuery("\"event text\""); //too many results
$query->setQuery('"event text"'); //too many results
$query->setQuery("event text"); //too many results
I realize the first two didn't work because the string is getting doubly URL-encoded. In the latter cases, I am getting the event I want, but also events including "event" or "text" that I don't want.
Could it be that Google has implemented the full-text query differently for the Calendar API? What kind of dumb things might I be doing on my end to break it?