GData Documents List API:按类型检索文件夹和文件列表



我想检索用户帐户中所有文件夹的列表&具有特定mime类型的文件,例如application/msword&application/pdf-

我使用下一个查询:https://docs.google.com/feeds/default/private/full/folder%3Aroot/contents/-/%7Bhttp%3A%2F%2Fschemas.google.com%2Fg%2F2005%23kind%7%Daplication%2Fmsword/%7Bhttp%3AF%2F%2Fschemas.googe.com%2Fg/2Fg%2F2F2F%2Fpdf/%7Bhttp%3F%2F%2Fschemas.gougle.com%2Fg%2F2005/23kind%7%Dimage%2Fjpg?最大结果=1000&showfolders=true&sortdorder=升序

作为回应,我只得到pdf和MS Word文件,没有文件夹

您使用的是旧的docslist,而不是新的Drive SDK。

在Drive中,您可以使用此

得到https://www.googleapis.com/drive/v2/files?maxResults=1000&q=mimeType+%3D+‘application%2Fmsword’+或+mimeType+%3D+’application%2Fpdf’+或+mimeType++3D+‘application%2Fvnd.google apps.folder’+&密钥={YOUR_API_key}

如果你去https://developers.google.com/drive/v2/reference/files/list#try-你可以自己试试。

最新更新