Private
Public Access
1
0

adding garmin id

This commit is contained in:
Sander Roosendaal
2020-07-16 22:07:45 +02:00
parent b0d7952fe3
commit 4b192addf2
3 changed files with 19 additions and 1 deletions

View File

@@ -697,6 +697,9 @@ def handle_get_garmin_file(client_id,
**kwargs):
regex = '.*\?id=(\d+)'
m = re.compile(regex).match(url).group(1)
garminid = int(m)
garmin = OAuth1Session(client_id,
client_secret=client_secret,
@@ -724,6 +727,7 @@ def handle_get_garmin_file(client_id,
'title': '',
'workouttype':'water',
'boattype':'1x',
'garminid': garminid,
}
session = requests.session()
newHeaders = {'Content-type': 'application/json', 'Accept': 'text/plain'}
@@ -2969,7 +2973,7 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
f.write('\n')
f.write(timestamp)
f.write(' ')
f.write('handle_get_garmin_file posted file with strava id {stravaid} user id {userid}\n'.format(
f.write('fetch_strava_workout posted file with strava id {stravaid} user id {userid}\n'.format(
stravaid=stravaid,userid=userid))