本文整理汇总了Python中stravalib.Client.get_segment_streams方法的典型用法代码示例。如果您正苦于以下问题:Python Client.get_segment_streams方法的具体用法?Python Client.get_segment_streams怎么用?Python Client.get_segment_streams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stravalib.Client
的用法示例。
在下文中一共展示了Client.get_segment_streams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from stravalib import Client [as 别名]
# 或者: from stravalib.Client import get_segment_streams [as 别名]
#print ("Duraction is %8.2f minutes" % (duration/60))
#print(dist)
SEGMENT = 229781
mysegment = client.get_segment(SEGMENT) #client.get_segment(,6795950158)
url = "https://www.strava.com/api/v3/segments/starred"
#response = urllib.urlopen(url)
#print(response)
print("My segment is {}".format(mysegment.name))
types = ['time', 'latlng', 'altitude', 'heartrate', 'temp', ]
streams = client.get_segment_streams(SEGMENT, types=types, resolution='high')
#streams = client.get_activity_streams(ACTIVITY, types=types, resolution='high')
# Result is a dictionary object. The dict's key are the stream type.
#if 'latlng' in streams.keys():
# print(streams['latlng'].data)
if __name__ == '__main__':
gpsp = GpsPoller() # create the thread
try:
gpsp.start() # start it up
while True:
#It may take a second or two to get good data
#print gpsd.fix.latitude,', ',gpsd.fix.longitude,' Time: ',gpsd.utc
GPIO.output(25,GPIO.HIGH)
os.system('clear')