Retrieving spreadsheet content using for a specific spreadsheet isn't that hard:
$key = 'txSLYk4BpIQaglM38cJbTNA'; // key for a specific spreadsheet
$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
$feed = $spreadSheetService->getWorksheetFeed($query);
$entries = $feed->entries->getContentsAsRows();
var_dump($entries); // dumps the spreadsheet content
Can I do the same for a specific text document?
The Zend_Gdata_Docs_Query class doesn't have a ->setDocumentKey($key) or equivalent...
(note: I haven't worked with ZF's GData API myself... this is speculative, based on browsing through the API)
It looks like you can call
Zend_Gdata_Docs::getDoc() - this will return a
Zend_Gdata_Docs_DocumentListEntry which in turn exposes a
$docsApi = new Zend_Gdata_Docs(); $document = $docsApi->getDoc('key-goes-here', 'document'); $content = $document->getContent(); // Returns the ATOM content // OR... $content = $document->getDOM(); // Returns a DOM for the content
It looks like the spreadsheet is a more specialised form of this more generic way of retrieving Google Docs content.