first working version of exported session to intervals.icu
This commit is contained in:
@@ -717,6 +717,20 @@ def steps_read_fit(filename, name='', sport='Custom'): # pragma: no cover
|
||||
|
||||
return d
|
||||
|
||||
def steps_read_intervals(filename, name='', sport='Custom'): # pragma: no cover
|
||||
authorizationstring = 'Bearer '+settings.WORKOUTS_FIT_TOKEN
|
||||
url = settings.WORKOUTS_FIT_URL+"/tointervals"
|
||||
headers = {'Authorization': authorizationstring}
|
||||
|
||||
response = requests.post(url=url, headers=headers,
|
||||
json={'filename': filename})
|
||||
|
||||
if response.status_code != 200: # pragma: no cover
|
||||
return None
|
||||
|
||||
w = response.text
|
||||
|
||||
return w
|
||||
|
||||
def steps_write_fit(steps):
|
||||
authorizationstring = 'Bearer '+settings.WORKOUTS_FIT_TOKEN
|
||||
|
||||
Reference in New Issue
Block a user