问题描述
我希望通过使用Google驱动器API的特定应用程序以编程方式打开驱动器文件。
目标是模仿使用所选文件的打开方式上下文菜单启动应用程序的GUI驱动方法。
尽管我可以使用应用,并未详细说明打开URL,尽我所能。
有谁知道是否可以使用API获取Open URL?
我相信,如果您将范围设置为drive.apps.readonly,您应该可以使用File方法getOpenWithLinks来发现URL。现在只需测试它,getOpenWithLinks方法在File类中不可用。我想知道它是否被弃用?当然,我找不到这样的证据。
$ b getOpenWithLinks方法在v2驱动器API的修订版本75中再次可用。
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?
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.
Revision: the getOpenWithLinks methods are available again in revision 75 of the v2 drive API.
这篇关于如何获取Google云端硬盘应用的打开网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!