ZF-4976: Add new DocumentsList Data API functionality for Folders
Description
File your documents: You can now create new folders in the API, move documents in and out of folders and have full access to nested folders. (Issue 377, Issue 383)
File your documents: You can now create new folders in the API, move documents in and out of folders and have full access to nested folders. (Issue 377, Issue 383)
Comments
Posted by Matthew Romaine (mromaine) on 2009-06-20T10:44:52.000+0000
Here's an initial patch that adds folder creation support.
Once you patch this in, you can also move and delete folders relatively easily with code outside the Gdata library.
Posted by Trevor Johns (tjohns) on 2009-06-22T12:29:50.000+0000
Hi Matthew, Thanks for the patch. Unfortunately, before we can accept your contributions, you need to sign and submit the Zend Framework CLA. This can be found here:
http://framework.zend.com/wiki/display/…
Once this is done and you're added to the zf-framework-dev group in JIRA, let me know and I'll process this patch.
Posted by Matthew Romaine (mromaine) on 2009-06-23T23:27:44.000+0000
Hi Trevor,
My CLA has been accepted and Hilary has added my account to the contributor group. Please proceed with processing this patch. Thanks!
Posted by Eric Bidelman (api.eric) on 2009-06-24T17:20:04.000+0000
Thanks Matthew. A couple of suggestions/comments.
DOCUMENTS_FOLDER_FEED_URI should not have a trailing '/folder'
It would be nice to have an additional (optional) argument $resource_id for creating a folder within another folder. This is similar to creating documents in folders: http://code.google.com/apis/documents/…
public function createFolder($folderName, $folderResourceId=null) { ... if ($folderResourceId != null) { $uri = self::DOCUMENTS_FOLDER_FEED_URI . '/' . $folderResourceId; } else { $uri = self::DOCUMENTS_LIST_FEED_URI; } return $this->insertEntry($entry, $uri); }
You could additionally allow $folderResourceId to be a full URI (http://docs.google.com/feeds/folders/…)
Posted by Matthew Romaine (mromaine) on 2010-01-05T06:06:51.000+0000
Hi guys,
Sorry it's taken me so long to get back to this. I've implemented Eric's suggestions (thanks Eric) and have attached an updated patch.
Would be great to see this in the next release.
Cheers, Matt
Posted by Trevor Johns (tjohns) on 2010-01-05T13:02:48.000+0000
Hi Matt. Looks good. Just a few comments from me.
My comments are preceded with a !. Eric may have additional review comments as well.
Posted by Eric Bidelman (api.eric) on 2010-01-05T13:09:58.000+0000
Looks good to me.
Posted by Matthew Romaine (mromaine) on 2010-01-05T19:46:16.000+0000
Hi guys, I've updated the patch file to include your comments. Hope that makes integration easier.
Posted by Trevor Johns (tjohns) on 2010-01-06T11:57:35.000+0000
One last change. I'll just go ahead and make this for you.
Each @see line needs to come immediately before it's respective require_once line.
As it currently stands, Zend_Gdata_App_Extension_Category will have too "See Also" lines in it's documentation, and Zend_Gdata_App_Extension_Title will have none.
Posted by Trevor Johns (tjohns) on 2010-01-06T18:40:48.000+0000
Commited to trunk as r20112. Scheduled for next minor release. Thanks for the patch!
I've created ZF-8732 to track some additional changes that need to be made to this, but that don't block integration.
commit 4e85fb9f4d222d2eb8603a4938625520683a8261 Author: tjohns Date: Thu Jan 7 02:39:32 2010 +0000 ZF-4976: Add createFolder() method to Zend_Gdata_Docs. Tests and a minor doc changes added by me. All other changes submitted via patch. Patch by: Matthew Romaine (mromaine) git-svn-id: http://framework.zend.com/svn/framework/… 44c647ce-9c0f-0410-b52a-842 library/Zend/Gdata/Docs.php | 51 ++++++++++++++++++++++++++++++++++++- tests/Zend/Gdata/DocsTest.php | 55 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 100 insertions(+), 6 deletions(-)