hotfix strava auto import
This commit is contained in:
@@ -100,6 +100,8 @@ def handle_strava_import_stroke_data(stravatoken,
|
|||||||
workoutsummary['timezone'] = "Etc/UTC"
|
workoutsummary['timezone'] = "Etc/UTC"
|
||||||
startdatetime = workoutsummary['start_date']
|
startdatetime = workoutsummary['start_date']
|
||||||
|
|
||||||
|
r = type('Rower', (object,), {"stravatoken": stravatoken})
|
||||||
|
|
||||||
spmjson = get_strava_stream(r,'cadence',stravaid)
|
spmjson = get_strava_stream(r,'cadence',stravaid)
|
||||||
hrjson = get_strava_stream(r,'heartrate',stravaid)
|
hrjson = get_strava_stream(r,'heartrate',stravaid)
|
||||||
timejson = get_strava_stream(r,'time',stravaid)
|
timejson = get_strava_stream(r,'time',stravaid)
|
||||||
|
|||||||
@@ -435,8 +435,8 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'resolution': 'medium',}
|
'resolution': 'medium',}
|
||||||
|
|
||||||
url = "https://www.strava.com/api/v3/activities/{stravaid}/streams/{metric}?resolution={fetchresolutions}&series_type={series_type}".format(
|
url = "https://www.strava.com/api/v3/activities/{stravaid}/streams/{metric}?resolution={fetchresolution}&series_type={series_type}".format(
|
||||||
stravaid=stravid,
|
stravaid=stravaid,
|
||||||
fetchresolution=fetchresolution,
|
fetchresolution=fetchresolution,
|
||||||
series_type=series_type,
|
series_type=series_type,
|
||||||
metric=metric
|
metric=metric
|
||||||
|
|||||||
Reference in New Issue
Block a user