Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

DocumentsRequest.Delete() sub-folder ONLY move it to root #356

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Use DocumentsRequest.Delete(document) to delete sub-folder, but it 
only move it from original position to the root space, looks like empty its 
ParentFolders, you must re-delete it from root. So weired!

Original issue reported on code.google.com by G.Talk.G on 22 Mar 2010 at 4:55

GoogleCodeExporter commented 9 years ago
Hmm. I thought i have a case in the documentslive.cs test case that does that. 
Have
you looked at the wire trace to see what is send and received from the server?

Original comment by fman...@gmail.com on 22 Mar 2010 at 2:24

GoogleCodeExporter commented 9 years ago
After using either DocumentsRequest.Delete(doc) or DocumentEntry.Delete() 
method, the document is deleted from the folder, but it's still showed in the 
Google 
Docs root folder; try using DocumentsRequest.GetFolders() to show it. Your case 
in 
documentslive.cs only delete the item but not assure whether the document 
folder 
is moved to root with another new ID as the same name/title.
By the way, is there any way to share document with .Net API?

Original comment by G.Talk.G on 23 Mar 2010 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by ccherub...@google.com on 18 Mar 2011 at 1:41

GoogleCodeExporter commented 9 years ago
Issue 542 has been merged into this issue.

Original comment by ccherub...@google.com on 1 Oct 2011 at 12:02

GoogleCodeExporter commented 9 years ago
When enumerating resources inside a subfolder, the items listed will include 
edit links in the following format:

https://docs.google.com/feeds/default/private/full/folder:FOLDER_ID/contents/RES
OURCE_ID

instead of 

https://docs.google.com/feeds/default/private/full:RESOURCE_ID

The former link is the one that has to be used to manipulate the content of the 
folder, so when sending a DELETE request to it, the (expected) result is to 
remove the resource from the folder:

http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#Re
movingFromCollections

You can still delete the item by sending a DELETE request like in the following 
code snippet: 

Uri deleteUri = new Uri(DocumentsListQuery.documentsBaseUri + "/" + 
resource.ResourceId);
request.Delete(deleteUri, resource.ETag);

Original comment by ccherub...@google.com on 13 Feb 2012 at 7:50

GoogleCodeExporter commented 9 years ago
This code snippet is working fine for me. Nevertheless I find it confusing, 
when calling request.Delete(Contact) it deletes it only from the label. Maybe 
you should override this function (e.g. Delete(Contact, bool removeLabelOnly))

Original comment by Saller....@gmail.com on 14 Feb 2012 at 8:42