PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Searching the documents feed

You can search the Document List using some of the standard Google Data API query parameters. Categories are used to restrict the type of document (word processor document, spreadsheet) returned. The full-text query string is used to search the content of all the documents. More detailed information on parameters specific to the Documents List can be found in the Documents List Data API Reference Guide.

Get a List of Word Processing Documents

You can also request a feed containing all of your documents of a specific type. For example, to see a list of your work processing documents, you would perform a category query as follows.

<?php
$feed 
$docs->getDocumentListFeed(
    
'http://docs.google.com/feeds/documents/private/full/-/document');

Get a List of Spreadsheets

To request a list of your Google Spreadsheets, use the following category query:

<?php
$feed 
$docs->getDocumentListFeed(
    
'http://docs.google.com/feeds/documents/private/full/-/spreadsheet');

Performing a text query

You can search the content of documents by using a Zend_Gdata_Docs_Query in your request. A Query object can be used to construct the query URI, with the search term being passed in as a parameter. Here is an example method which queries the documents list for documents which contain the search string:

<?php
$docsQuery 
= new Zend_Gdata_Docs_Query();
$docsQuery->setQuery($query);
$feed $client->getDocumentListFeed($docsQuery);

Zend Framework