当前位置: 首页>>代码示例>>Python>>正文


Python Client.get_club_members方法代码示例

本文整理汇总了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)
开发者ID:Gidgidonihah,项目名称:strava-fitness-challenge-leaderboard,代码行数:11,代码来源:views.py

示例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)
    
开发者ID:mrkarlos,项目名称:strava_club,代码行数:32,代码来源:cs_club.py


注:本文中的stravalib.client.Client.get_club_members方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。