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