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


Python Client.get_effort_streams方法代码示例

本文整理汇总了Python中stravalib.client.Client.get_effort_streams方法的典型用法代码示例。如果您正苦于以下问题:Python Client.get_effort_streams方法的具体用法?Python Client.get_effort_streams怎么用?Python Client.get_effort_streams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在stravalib.client.Client的用法示例。


在下文中一共展示了Client.get_effort_streams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: print

# 需要导入模块: from stravalib.client import Client [as 别名]
# 或者: from stravalib.client.Client import get_effort_streams [as 别名]
iterator = 0

for entry in STRONZO:
    print (float(iterator) / float(len(STRONZO)))
    iterator += 1
    activity = client.get_activity(entry.id, True)
    # stream = client.get_activity_streams(entry.id, stream_types)
    # segment_array.append(stream)
    if activity.segment_efforts:
        for efforts in activity.segment_efforts:
            # segment_activity.effort_stream = client.get_effort_streams(efforts.id, stream_types)
            # segment_activity = client.get_effort_streams(efforts.id, stream_types)
            # segment_activity.activity_id = activity.id
            # segment_activity.effort_id = efforts.id
            for leaderboard_entry in efforts.segment.leaderboard.entries:
                segment_activity = client.get_effort_streams(leaderboard_entry.effort.id, stream_types)
                segment_array.append({
                    'id': leaderboard_entry.effort.id,
                    'name': leaderboard_entry.athlete_name,
                    'streams': segment_activity
                })



ActivityArray = np.asarray(segment_array)

np.savez('/home/lgum/BitBucket/STRONZO/efforts.npz', ActivityArray)
test = np.load('/home/lgum/BitBucket/STRONZO/efforts.npz')

p = figure(width=500, height=500)
output_file('/home/lgum/BitBucket/STRONZO/lines.html', title='line plot example')
开发者ID:Lgum,项目名称:STRONZO,代码行数:33,代码来源:stronzo.py


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