本文整理汇总了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')