Private
Public Access
1
0

able to retrieve session list from rojabo

This commit is contained in:
Sander Roosendaal
2022-04-14 16:16:02 +02:00
parent 6ef9c19f4a
commit 17d1cca640
3 changed files with 50 additions and 13 deletions

View File

@@ -845,16 +845,16 @@ def get_c2_workout_list(user, page=1):
s = "Token expired. Needs to refresh."
return custom_exception_handler(401, s)
else:
# ready to fetch. Hurray
authorizationstring = str('Bearer ' + r.c2token)
headers = {'Authorization': authorizationstring,
'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)
# ready to fetch. Hurray
authorizationstring = str('Bearer ' + r.c2token)
headers = {'Authorization': authorizationstring,
'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