Google Doc's (Spreadsheet) get Revision Id

走远了吗. 提交于 2019-12-23 04:29:03

问题


I'm testing this page:

https://developers.google.com/drive/v2/reference/revisions/get#try-it

I can't find the revision id and when i try put something like i think is the revision id, an error is displayed saying: "message": "Revision not found: "

How i can find the revision id of the file (i'm trying for Spreadsheet)?

Later i'll try to use (in java):

RevisionList revisions = service.revisions().list(fileId).execute();
return revisions.getItems();

But for now i need to do manually.


回答1:


It works fine. You need some correct file id and revision id.

For eg -

File Id = 0Vs336aBx5r3MdHJz1TZaCi1kb0JsOExoSHJDMWFZVUE
Revision Id = 13723331213000

Steps -

  1. Get a valid File Id from here. In try it out - maxResults = 5 https://developers.google.com/drive/v2/reference/files/list
    From the json reply select any file id.

  2. Get all the revisions for this file - https://developers.google.com/drive/v2/reference/revisions/list
    Try it out - fieldId = enter the File Id copied from above step.
    From the json reply select any revision id

  3. Now use the File Id and Revision Id here - https://developers.google.com/drive/v2/reference/revisions/get#try-it



来源:https://stackoverflow.com/questions/18321050/google-docs-spreadsheet-get-revision-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!