gpt4 book ai didi

c# - 如何获得 Google 文档的说明?

转载 作者:行者123 更新时间:2023-11-30 17:12:36 25 4
gpt4 key购买 nike

目标

假设我在 Google 文档/云端硬盘中有一个文档集合/文件夹,我想以编程方式检索与每个文档关联的描述:

(您可以通过选择列表中的文件,然后点击“眼睛”图标来获得)

The description I want

工作 代码

我正在使用 .NET library for the Google Data API并让基本的登录和检索正常工作:

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?
}

但是,.Summary 属性返回时始终为 null。

问题

  1. 我一直在假设 .Summary 是基于一些已弃用的代码部分等的正确位置。这是一个虚假的假设吗?
  2. 我还可以如何检索与文档关联的描述? (“我可以解密吗?”在上面的可笑示例中)

最佳答案

.NET 客户端库没有公开该字段,我只是在 rev 中提交了一些代码。 1189 (http://code.google.com/p/google-gdata/source/detail?r=1189) 向 DocumentEntry 类添加了 Description 属性。您现在可以使用以下代码访问描述:

string description = document.DocumentEntry.Description;

关于c# - 如何获得 Google 文档的说明?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10567582/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com