Private
Public Access
1
0

first working version of exported session to intervals.icu

This commit is contained in:
2024-12-18 20:35:46 +01:00
parent 946a9dc2a5
commit e6cc169cef
11 changed files with 166 additions and 53 deletions

View File

@@ -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