使用 Python API,我创建了一个导出。如何使用相同的授权服务下载导出中的 .zip 文件?创建导出时,我可以看到 cloudStorageSink 的 bucketName 和 objectNames,但是我找不到有关如何使用创建导出的现有服务将它们下载到我的主机的任何文档
#!/usr/bin/env python
from __future__ import print_function
import datetime
import json
import time
from googleapiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
# If modifying these scopes, delete the file token.json.
SCOPES = 'https://www.googleapis.com/auth/ediscovery'
def list_exports(service, matter_id):
return service.matters().exports().list(matterId=matter_id).execute()
def get_export_by_id(service, matter_id, export_id):
return service.matters().exports().get(matterId=matter_id, exportId=export_id).execute()
def get_service():
'''
Look for an active credential token, if one does not exist, use credentials.json
and ask user for …Run Code Online (Sandbox Code Playgroud)