我正在尝试使用googleapi mocker,如下文档所述。但是对于日历API,不是书本API。你知道吗
from apiclient.discovery import build
from apiclient.http import HttpMock
import pprint
http = HttpMock('books-discovery.json', {'status': '200'})
api_key = 'your_api_key'
service = build('books', 'v1', http=http, developerKey=api_key)
request = service.volumes().list(source='public', q='android')
http = HttpMock('books-android.json', {'status': '200'})
response = request.execute(http=http)
pprint.pprint(response)
这里有一个图书发现json返回值here的示例。你知道吗
如何生成或获取discovery Calendar API V3的响应json?你知道吗
您可以使用API Discovery Service获取Calendar API v3的发现文档。你知道吗
相关问题 更多 >
编程相关推荐