more code for garmin files
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user