NK doiesnt upload well
This commit is contained in:
@@ -57,7 +57,7 @@ from rowingdata import (
|
|||||||
MysteryParser, BoatCoachOTWParser,QuiskeParser,
|
MysteryParser, BoatCoachOTWParser,QuiskeParser,
|
||||||
painsledDesktopParser, speedcoachParser, ErgStickParser,
|
painsledDesktopParser, speedcoachParser, ErgStickParser,
|
||||||
SpeedCoach2Parser, FITParser, fitsummarydata,
|
SpeedCoach2Parser, FITParser, fitsummarydata,
|
||||||
RitmoTimeParser,KinoMapParser,
|
RitmoTimeParser,KinoMapParser,NKLiNKLogbookParser,
|
||||||
make_cumvalues,cumcpdata,ExcelTemplate,
|
make_cumvalues,cumcpdata,ExcelTemplate,
|
||||||
summarydata, get_file_type,
|
summarydata, get_file_type,
|
||||||
)
|
)
|
||||||
@@ -1850,10 +1850,12 @@ parsers = {
|
|||||||
'ergdata': ErgDataParser,
|
'ergdata': ErgDataParser,
|
||||||
'humon': HumonParser,
|
'humon': HumonParser,
|
||||||
'eth': ETHParser,
|
'eth': ETHParser,
|
||||||
|
'nklinklogbook': NKLiNKLogbookParser,
|
||||||
}
|
}
|
||||||
|
|
||||||
def parsenonpainsled(fileformat,f2,summary,startdatetime=''):
|
def parsenonpainsled(fileformat,f2,summary,startdatetime=''):
|
||||||
try:
|
try:
|
||||||
|
print(fileformat)
|
||||||
row = parsers[fileformat](f2)
|
row = parsers[fileformat](f2)
|
||||||
if startdatetime != '':
|
if startdatetime != '':
|
||||||
row.rowdatetime = arrow.get(startdatetime).datetime
|
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)']
|
rowdatadf[' ElapsedTime (sec)'] = rowdatadf['TimeStamp (sec)']
|
||||||
|
|
||||||
if empower:
|
if empower:
|
||||||
|
print('aap')
|
||||||
try:
|
try:
|
||||||
wash = rowdatadf.loc[:, 'wash']
|
wash = rowdatadf.loc[:, 'wash']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ from time import strftime
|
|||||||
|
|
||||||
import requests
|
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/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/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
|
from requests_oauthlib import OAuth2Session
|
||||||
|
|
||||||
@@ -43,13 +43,13 @@ oauth_data = {
|
|||||||
'client_id': NK_CLIENT_ID,
|
'client_id': NK_CLIENT_ID,
|
||||||
'client_secret': NK_CLIENT_SECRET,
|
'client_secret': NK_CLIENT_SECRET,
|
||||||
'redirect_uri': NK_REDIRECT_URI,
|
'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',
|
'content_type': 'application/json',
|
||||||
'tokenname': 'nktoken',
|
'tokenname': 'nktoken',
|
||||||
'refreshtokenname': 'nkrefreshtoken',
|
'refreshtokenname': 'nkrefreshtoken',
|
||||||
'expirydatename': 'nktokenexpirydate',
|
'expirydatename': 'nktokenexpirydate',
|
||||||
'bearer_auth': True,
|
'bearer_auth': True,
|
||||||
'base_url': "https://oauth-stage.nkrowlink.com/oauth/token",
|
'base_url': "https:#oauth-stage.nkrowlink.com/oauth/token",
|
||||||
'scope':'read',
|
'scope':'read',
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ def get_workout(user,nkid):
|
|||||||
|
|
||||||
df = pd.concat([df,df2],axis=1)
|
df = pd.concat([df,df2],axis=1)
|
||||||
|
|
||||||
print(df.info())
|
# not to_csv and run upload API!
|
||||||
|
|
||||||
# get workout data
|
# get workout data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user