0
我用在我的應用程序下面的方法來與衆多基於發現的谷歌API的交互驅動方式:下載文件,發現API
service, flags = sample_tools.init(
sys.argv, 'drive', 'v3', __doc__, __file__,
scope='https://www.googleapis.com/auth/drive')
try:
self.data = service.files().get(
fileId = file_id
).execute()
except Exception as e:
print str(e)
然而,爲了要下載的文件,我需要在URL中添加「alt ='media'」參數。我一直無法找到任何有關如何通過這種實現來完成的文檔。我試過使用「導出」方法,但只適用於Google Docs,而不適用於其他類型的文件(我的是CSV)。
謝謝!