adding garmin id
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user