How do I get a Google Drive App's Open URL?

旧时模样 提交于 2019-12-20 04:59:10

问题


I am hoping to programatically open a drive file with a particular app using the Google drive APIs.

The aim is to mimic the GUI drive method of launching an app using the "Open With" context menu for a selected file.

While I can get a list of the available apps using apps list method, the app resource doesn't detail the Open URL as far as I can work out.

Does anyone know if it is possible to obtain the Open URL using the APIs?


回答1:


I believe if you have the scope set for drive.apps.readonly you should be able to use the File method getOpenWithLinks to discover the URLs. Just testing it now, the getOpenWithLinks method isn't available on the File class. I wonder if it has been deprecated? Certainly I can't find evidence of it being so.

https://developers.google.com/resources/api-libraries/documentation/drive/v2/java/latest/com/google/api/services/drive/model/File.html#getOpenWithLinks()

Revision: the getOpenWithLinks methods are available again in revision 75 of the v2 drive API.



来源:https://stackoverflow.com/questions/16355487/how-do-i-get-a-google-drive-apps-open-url

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