twisted的google数据api
txgoogle的Python项目详细描述
txgoogleapi
==
此库允许使用twisted应用程序框架以异步方式访问google数据api
。
实际实现的api很少,但是添加api应该是非常简单的。
身份验证或通过向查询字符串添加api密钥
。txgoogleapi为这两种情况都提供实用程序
类。
txgoogleapi.unauth廑requester-未经身份验证的api访问
txgoogleapi.api廑key廑requester-使用api密钥进行身份验证
txgoogleapi.oauth廑requester-使用oauth 2.0进行身份验证
defer
来自twisted.internet.task import react
导入txgoogleapi
requester=txgoogleapi.apikeyrequester(您的api密钥)
google=txgoogleapi.google(requester)
@defer.inlinecallbacks
def main(reactor):
result=yield google.urlshortener.url.insert(body={
“longurl”:“http://github.com”,
})
打印“short url:”,结果[“id”]
react(main)
1.0.0版-初始版本
-所有内容
==
此库允许使用twisted应用程序框架以异步方式访问google数据api
。
实际实现的api很少,但是添加api应该是非常简单的。
身份验证或通过向查询字符串添加api密钥
。txgoogleapi为这两种情况都提供实用程序
类。
txgoogleapi.unauth廑requester-未经身份验证的api访问
txgoogleapi.api廑key廑requester-使用api密钥进行身份验证
txgoogleapi.oauth廑requester-使用oauth 2.0进行身份验证
defer
来自twisted.internet.task import react
导入txgoogleapi
requester=txgoogleapi.apikeyrequester(您的api密钥)
google=txgoogleapi.google(requester)
@defer.inlinecallbacks
def main(reactor):
result=yield google.urlshortener.url.insert(body={
“longurl”:“http://github.com”,
})
打印“short url:”,结果[“id”]
react(main)
1.0.0版-初始版本
-所有内容