Private
Public Access
1
0

bike erg import from C2 log

This commit is contained in:
Sander Roosendaal
2018-08-29 09:46:46 +02:00
parent 10e989d32d
commit cadc5d5e0d
4 changed files with 19 additions and 7 deletions

View File

@@ -89,7 +89,12 @@ def handle_c2_import_stroke_data(c2token,
c2id,workoutid,
starttimeunix,
csvfilename,debug=True,**kwargs):
if 'workouttype' in kwargs:
workouttype = kwargs['workouttype']
else:
workouttype = 'rower'
authorizationstring = str('Bearer ' + c2token)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',
@@ -100,7 +105,7 @@ def handle_c2_import_stroke_data(c2token,
strokedata = pd.DataFrame.from_dict(s.json()['data'])
result = add_c2_stroke_data_db(
strokedata,workoutid,starttimeunix,
csvfilename,debug=debug,
csvfilename,debug=debug,workouttype=workouttype
)
return 1