Say I have a collection/folder of documents in Google Docs/Drive, and I want to programmatically retrieve the Description associated with each:
(You get this by selecting the file in the list, then hitting the "eye" icon)
I am using the .NET library for the Google Data API and have the basic login and retrieval working without issue:
GDataCredentials credentials = BuildSomethingUp();
RequestSettings settings
= new RequestSettings("code.google.com/p/exult/", credentials);
Request request = new Request(settings);
Feed<Document> feed = request.GetFolderContent(resourceId);
List<Document> documents = feed.Entries.ToList();
foreach (Document document in documents
.Where(item => item.Type != Document.DocumentType.Folder))
{
string summary = document.Summary; //y no can haz?
}
However, the .Summary
property always comes back as null.
.Summary
was the correct location based on some deprecated code sections, etc. Is this a bogus assumption?The .NET client library didn't expose that field, I just committed some code in rev. 1189 (http://code.google.com/p/google-gdata/source/detail?r=1189) that adds a Description property to the DocumentEntry class. You can now access the description with the following code:
string description = document.DocumentEntry.Description;