imports more than 50 workouts from C2
This commit is contained in:
@@ -484,7 +484,7 @@ def get_c2_workout_strokes(user,c2id):
|
||||
|
||||
# Get list of C2 workouts. We load only the first page,
|
||||
# assuming that users don't want to import their old workouts
|
||||
def get_c2_workout_list(user):
|
||||
def get_c2_workout_list(user,page=1):
|
||||
r = Rower.objects.get(user=user)
|
||||
if (r.c2token == '') or (r.c2token is None):
|
||||
s = "Token doesn't exist. Need to authorize"
|
||||
@@ -499,6 +499,8 @@ def get_c2_workout_list(user):
|
||||
'user-agent': 'sanderroosendaal',
|
||||
'Content-Type': 'application/json'}
|
||||
url = "https://log.concept2.com/api/users/me/results"
|
||||
url += "?page={page}".format(page=page)
|
||||
|
||||
s = requests.get(url,headers=headers)
|
||||
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user