【发布时间】:2012-05-22 01:07:50
【问题描述】:
我正在尝试使用 Google Calendar API v3 调试我的界面。我正在用 python 编写代码并使用我能找到的 API 示例。我想确保向 API 发送正确的 html 字符串。我看到代码是如何构建字符串和插入参数的,但我不知道在 execute() 命令中发送的实际字符串是什么。
有没有办法打印正在发送而不是执行的 html 字符串?请举例。
http = httplib2.Http(cache=".cache")
http = credentials.authorize(http)
service = build("moderator", "v1", http=http)
series_body = {
"description": "Share and rank tips for eating healthy and cheap!",
"name": "Eating Healthy & Cheap",
"videoSubmissionAllowed": False
}
# How Do I print the string rather than execute?
series = service.series().insert(body=series_body).execute()
print "Created a new series"
【问题讨论】:
标签: python google-api google-api-python-client