Ebeo / google-gdata

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

Can't able to access sub folders #450

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Getting the list of folders
2. drill down from root folder to leaf folder.

What is the expected output? What do you see instead?
Can't able to see the sub folders list of any root folder.
Below error is coming 

Execution of request failed: 
http://docs.google.com/feeds/default/private/full/folder:folder:0Bwx1d6O8nGh5MjV
hODk1NmUtYTJhYS00NTM2LWExNTYtN2NkZGFiZDU3YjI5/contents/-/folder

Google GData API - version 1.6.0.0
Operating system - Windows 7 Enterprise

Original issue reported on code.google.com by rp.sing...@gmail.com on 6 Dec 2010 at 5:01

GoogleCodeExporter commented 9 years ago
Can you show us your code so that we may try to reproduce the issue?

Original comment by ccherub...@google.com on 6 Dec 2010 at 10:24

GoogleCodeExporter commented 9 years ago
Yes Sure, here is the method below from which we are accessing the list of 
subfolders

public static List<GFolderBO> GetGSubFolders(string token, string resourceId)
        {
            List<GFolderBO> gFoldList = new List<GFolderBO>();
            DocumentsListQuery query = new DocumentsListQuery("http://docs.google.com/feeds/default/private/full/folder%3" + resourceId + "/contents/-/folder");
            DocumentsService service;
            try
            {
                service = GDocumentsService.GetDocumentsService(token);

                DocumentsFeed feed = service.Query(query);
                if (feed.Entries.Count != 0)
                {
                    foreach (DocumentEntry entry in feed.Entries)
                    {
                        GFolderBO docEntry = new GFolderBO();
                        docEntry.Name = entry.Title.Text;
                        docEntry.Date = entry.Published;
                        docEntry.ResourceId = entry.ResourceId;
                        gFoldList.Add(docEntry);
                    }
                }

            }
            catch (Exception ex)
            {
                log.Error(ex.Message, ex);
                throw ex;
            }
            return gFoldList;
        }

Original comment by rp.sing...@gmail.com on 6 Dec 2010 at 10:34

GoogleCodeExporter commented 9 years ago
this method was running perfectly fine , but from last 2 days it is throwing 
the same exception.

Original comment by rp.sing...@gmail.com on 6 Dec 2010 at 10:35

GoogleCodeExporter commented 9 years ago
The feeds for the Documents List Data API use https and not http.
Can you please edit your code to use:

https://docs.google.com/feeds/default/private/full/folder%3

instead of the current queri uri?

Original comment by ccherub...@google.com on 7 Dec 2010 at 8:25

GoogleCodeExporter commented 9 years ago
I tried this thing also but nothing happened. in some post I found
query.UseSSL = false; 
then also same problem, I think there is something updated in the API, please 
check or guide me which method shall we follow to get the desired result.

Original comment by rp.sing...@gmail.com on 8 Dec 2010 at 4:32

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
The recently updated documentation includes samples showing how to deal with 
folders and subfolders, please refer to them:

https://developers.google.com/google-apps/documents-list/

Original comment by ccherub...@google.com on 19 Apr 2012 at 11:20