I am having trouble working with Google Docs and Zend Framework 1.11.4.
What I am attempting to do is upload a document to Google Docs, retrieve the HTML content and delete the document. I am working with .doc, .pdf, and .rtf files.
My code so far:
$client = Zend_Gdata_ClientLogin::getHttpClient(
'my@googleDocsEmail.address',
'MyPassword',
Zend_Gdata_Docs::AUTH_SERVICE_NAME
);
$gdClient = new Zend_Gdata_Docs($client);
$newDocumentEntry = $gdClient->uploadFile(
$file,
null,
null,
Zend_Gdata_Docs::DOCUMENTS_LIST_FEED_URI
);
$cv = file_get_contents($newDocumentEntry->getContent()->getSrc());
$newDocumentEntry->delete();
Everything works fine until the ->delete() method is called, it returns an exception Expected response code 200, got 409
I have been Googling this for a couple of days now but can find no answer, according to Googles documentation this is the correct way to delete a document.
If anyone has any idea as to what I am doing wrong then any help would be very welcome.
Many thanks in advance, Garry