Google REST API v3 - 修订版:列表与"显示更详细的修订版"

时间:2016-01-22 20:35:40

标签: google-drive-api google-api-v3

我需要获取Google文档修订的详细列表 在以下网址上使用Google API资源管理器时:

GET https://www.googleapis.com/drive/v3/files/{fileId}/revisions

我只获得非详细列表。

要调用的API(或要设置的参数),以便通过按显示更详细的修订来获得类似的内容?

更新
我试图"嗅探"浏览器流量,我意识到Google云端硬盘会定期向网址请求修订列表:

https://docs.google.com/spreadsheets/d/{fileId}/revisions/history?id={fileId}&start=1&end=-1&zoom_level=0&token={token}

点击显示更详细的修订时,之前的网址变为:

https://docs.google.com/spreadsheets/d/{fileId}/revisions/history?id={fileId}&start=1&end=-1&zoom_level=1&token={token}

zoom_level 参数从 0 更改为 1
但是,我在API参考上找不到类似的东西。似乎必须手动调用这样的URL 因此,我手动为驱动器范围生成了一个令牌,手动检查它以保持新鲜并手动调用该URL,以便查看发生的情况。不幸的是,我在浏览器上遇到以下错误:

Impossibile aprire il file in questo momento.
Verifica l'indirizzo e riprova.

大致意味着:

Unable to open the file at the moment.
Please verify the address and try again.
是的,有人能指出我朝着正确的方向前进吗?

1 个答案:

答案 0 :(得分:0)

在API的“Try it”部分中,有一个名为“fields”的字段。在那里,您可以从响应中选择所需的文件。如果你写“kind,revisions”,你将获得完整的信息,或者你可以使用“字段编辑器”来选择你需要的字段。