Private
Public Access
1
0

more code for garmin files

This commit is contained in:
Sander Roosendaal
2020-07-08 15:01:01 +02:00
parent 3bff06abb5
commit c1803ed4a9
3 changed files with 45 additions and 11 deletions

View File

@@ -110,14 +110,18 @@ def garmin_open(user):
return token
def get_garmin_file(r,callbackURL,starttime):
garmin = OAuth1Session(oauth_data['client_id'],
client_secret=oauth_data['client_secret'],
resource_owner_key=r.garmintoken,
resource_owner_secret=r.garminrefreshtoken,
)
response = garmin.get(callbackURL)
return 1
def get_garmin_file(r,callbackURL,starttime,fileType):
job = queuehigh.enqueue(
get_garmin_file,
oauth_data['client_id'],
oauth_data['client_secret'],
garmintoken,
garminrefreshtoken,
r.user.id,
callbackURL,filetype
)
return job.id
def get_garmin_workout_list(user):
r = Rower.objects.get(user=user)