Private
Public Access
1
0

NK doiesnt upload well

This commit is contained in:
Sander Roosendaal
2021-04-03 21:38:57 +02:00
parent 0fc6ecb70c
commit ec6de05630
2 changed files with 9 additions and 6 deletions

View File

@@ -57,7 +57,7 @@ from rowingdata import (
MysteryParser, BoatCoachOTWParser,QuiskeParser,
painsledDesktopParser, speedcoachParser, ErgStickParser,
SpeedCoach2Parser, FITParser, fitsummarydata,
RitmoTimeParser,KinoMapParser,
RitmoTimeParser,KinoMapParser,NKLiNKLogbookParser,
make_cumvalues,cumcpdata,ExcelTemplate,
summarydata, get_file_type,
)
@@ -1850,10 +1850,12 @@ parsers = {
'ergdata': ErgDataParser,
'humon': HumonParser,
'eth': ETHParser,
'nklinklogbook': NKLiNKLogbookParser,
}
def parsenonpainsled(fileformat,f2,summary,startdatetime=''):
try:
print(fileformat)
row = parsers[fileformat](f2)
if startdatetime != '':
row.rowdatetime = arrow.get(startdatetime).datetime
@@ -2872,6 +2874,7 @@ def dataprep(rowdatadf, id=0, bands=True, barchart=True, otwpower=True,
rowdatadf[' ElapsedTime (sec)'] = rowdatadf['TimeStamp (sec)']
if empower:
print('aap')
try:
wash = rowdatadf.loc[:, 'wash']
except KeyError:

View File

@@ -9,8 +9,8 @@ from time import strftime
import requests
#https://oauth-stage.nkrowlink.com/oauth/authorizegrant_type=authorization_code&response_type=code&client_id=rowsandall-staging&scope=read&state=fc8fc3d8-ce0a-443e-838a-1c06fb5317c6&redirect_uri=https%3A%2F%2Fdunav.ngrok.io%2Fnk_callback%2F
#https://oauth-stage.nkrowlink.com/oauth/authorize?grant_type=authorization_code&response_type=code&client_id=rowsandall-staging&scope=read&state=1234&redirect_uri=https%3A%2F%2Fdev.rowsandall.com%2Fnk_callback
#https:#oauth-stage.nkrowlink.com/oauth/authorizegrant_type=authorization_code&response_type=code&client_id=rowsandall-staging&scope=read&state=fc8fc3d8-ce0a-443e-838a-1c06fb5317c6&redirect_uri=https%3A%2F%2Fdunav.ngrok.io%2Fnk_callback%2F
#https:#oauth-stage.nkrowlink.com/oauth/authorize?grant_type=authorization_code&response_type=code&client_id=rowsandall-staging&scope=read&state=1234&redirect_uri=https%3A%2F%2Fdev.rowsandall.com%2Fnk_callback
from requests_oauthlib import OAuth2Session
@@ -43,13 +43,13 @@ oauth_data = {
'client_id': NK_CLIENT_ID,
'client_secret': NK_CLIENT_SECRET,
'redirect_uri': NK_REDIRECT_URI,
'autorization_uri': "https://oauth-stage.nkrowlink.com/oauth/authorize",
'autorization_uri': "https:#oauth-stage.nkrowlink.com/oauth/authorize",
'content_type': 'application/json',
'tokenname': 'nktoken',
'refreshtokenname': 'nkrefreshtoken',
'expirydatename': 'nktokenexpirydate',
'bearer_auth': True,
'base_url': "https://oauth-stage.nkrowlink.com/oauth/token",
'base_url': "https:#oauth-stage.nkrowlink.com/oauth/token",
'scope':'read',
}
@@ -232,7 +232,7 @@ def get_workout(user,nkid):
df = pd.concat([df,df2],axis=1)
print(df.info())
# not to_csv and run upload API!
# get workout data