本文整理汇总了Python中stravalib.client.Client.get_club_members方法的典型用法代码示例。如果您正苦于以下问题:Python Client.get_club_members方法的具体用法?Python Client.get_club_members怎么用?Python Client.get_club_members使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stravalib.client.Client
的用法示例。
在下文中一共展示了Client.get_club_members方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_club_members
# 需要导入模块: from stravalib.client import Client [as 别名]
# 或者: from stravalib.client.Client import get_club_members [as 别名]
def _get_club_members():
""" Get all athletes belonging to our club. """
athlete = Athlete.objects.order_by('?').first()
if not athlete:
return []
client = Client(access_token=athlete.strava_token)
return client.get_club_members(settings.STRAVA_CHALLENGE_CLUB_ID)
示例2: Client
# 需要导入模块: from stravalib.client import Client [as 别名]
# 或者: from stravalib.client.Client import get_club_members [as 别名]
from stravalib.client import Client
club_id = 24151
client = Client(access_token='250d33ceabfbe833376eb18885e797af14888512')
athlete = client.get_athlete() # Get John's full athlete record
print("Hello, {}. I know your email is {}".format(athlete.firstname, athlete.email))
# "Hello, John. I know your email is [email protected]"
activities = client.get_activities(limit=10)
assert len(list(activities)) == 10
clubs = client.get_athlete_clubs()
icc_members = client.get_club_members(club_id, limit=20)
assert len(list(icc_members)) == 20
club_activities = client.get_club_activities(club_id, limit=20)
assert len(list(club_activities)) == 20
#View activities
#for x in activities:
# print (x)
for x in clubs:
print (x)
for x in icc_members:
print (x)