本文整理汇总了Python中twitdao.Twitdao.statuses_friends方法的典型用法代码示例。如果您正苦于以下问题:Python Twitdao.statuses_friends方法的具体用法?Python Twitdao.statuses_friends怎么用?Python Twitdao.statuses_friends使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类twitdao.Twitdao
的用法示例。
在下文中一共展示了Twitdao.statuses_friends方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from twitdao import Twitdao [as 别名]
# 或者: from twitdao.Twitdao import statuses_friends [as 别名]
def get(self, screen_name):
params = self.params(["user_id", "cursor", "include_entities"], cursor=-1)
token = md.get_default_access_token()
if not token:
self.redirect("/settings")
return
td = Twitdao(token)
token_user = td.users_show_by_id(user_id=token.user_id)
owner_user = td.users_show_by_screen_name(screen_name=screen_name)
following = td.statuses_friends(screen_name=screen_name, **params)
self.render(
"following.html",
{
"token": token,
"token_user": token_user,
"owner_user": owner_user,
"error": following["error"] if "error" in following else False,
"following": following if "error" in following else following["users"],
"next_cursor": None if "error" in following else following["next_cursor"],
"next_cursor_str": None if "error" in following else following["next_cursor_str"],
"previous_cursor": None if "error" in following else following["previous_cursor"],
"previous_cursor_str": None if "error" in following else following["previous_cursor_str"],
"where": "following",
},
)