google docs api文件夹

时间:2012-11-16 14:10:00

标签: java api directory

我正在尝试开发一个java函数来通过Google Docs检索一个特定文件夹的ID,但是这个语言的文档很差,并且开发它有问题。到现在为止我可以做到这一点,但是不起作用,它从不显示我文件夹的文件ID

public void findfolder(String folderName) throws MalformedURLException,IOException,ServiceException{

URL feedUrla=new URL("https://docs.google.com/feeds/default/private/full/-/folder");

DocumentQuery query = new DocumentQuery(feedUrl);
query.setTitleQuery(folderName);
query.setTitleExact(true);
DocumentListFeed feed=null;

try {
feed = client.getFeed(query, DocumentListFeed.class);
} catch (IOException e) {
e.printStackTrace();
} catch (ServiceException e) {
e.printStackTrace();
}

for (DocumentListEntry entry : feed.getEntries()) {
System.out.println(entry.getDocId());
}
}`

0 个答案:

没有答案
相关问题