最小开关接口
Klout的Python项目详细描述
klout api
一个极简的klout api接口。使用此API 需要kloutdeveloper key。你可以注册 在
<http://klout.com/s/developers/v2>
完整的文档位于:
<https://klout.readthedocs.org/en/latest/>
设计哲学
快速启动
安装pypi包:
pip install Klout
这个简短的示例演示如何首先获取kloutid并使用该kloutid获取用户的分数:
from klout import * # Make the Klout object k = Klout('YOUR_KEY_HERE') # Get kloutId of the user by inputting a twitter screenName kloutId = k.identity.klout(screenName="erfaan").get('id') # Get klout score of the user score = k.user.score(kloutId=kloutId).get('score') print "User's klout score is: %s" % (score) # By default all communication is not secure (HTTP). An optional secure parameter # can be sepcified for secure (HTTPS) communication k = Klout('YOUR_KEY_HERE', secure=True) # Optionally a timeout parameter (seconds) can also be sent with all calls score = k.user.score(kloutId=kloutId, timeout=5).get('score')
许可证
麻省理工学院执照。参见license.txt 版权所有(c)2012 Irfan Ahmad