Private
Public Access
1
0

more autopep

This commit is contained in:
Sander Roosendaal
2022-03-10 17:16:31 +01:00
parent 8070a68931
commit a0223bec24
5 changed files with 32 additions and 60 deletions

View File

@@ -21,8 +21,6 @@ from rowsandall_app.settings import (
tpapilocation = "https://api.trainingpeaks.com"
#from async_messages import message_user,messages
oauth_data = {
'client_id': TP_CLIENT_ID,
'client_secret': TP_CLIENT_SECRET,
@@ -53,7 +51,7 @@ def do_refresh_token(refreshtoken):
def get_token(code):
client_auth = requests.auth.HTTPBasicAuth(TP_CLIENT_KEY, TP_CLIENT_SECRET)
# client_auth = requests.auth.HTTPBasicAuth(TP_CLIENT_KEY, TP_CLIENT_SECRET)
post_data = {
"client_id": TP_CLIENT_KEY,
"grant_type": "authorization_code",
@@ -61,9 +59,6 @@ def get_token(code):
"redirect_uri": TP_REDIRECT_URI,
"client_secret": TP_CLIENT_SECRET,
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
}
response = requests.post(
"https://oauth.trainingpeaks.com/oauth/token",