Private
Public Access
1
0

trainingpeaks to production

This commit is contained in:
Sander Roosendaal
2017-05-08 18:10:18 +02:00
parent 4b80e30b74
commit 358782fc0f
5 changed files with 6 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ from rowsandall_app.settings import (
TP_REDIRECT_URI,TP_CLIENT_KEY,
)
tpapilocation = "https://api.sandbox.trainingpeaks.com"
tpapilocation = "https://api.trainingpeaks.com"
# Custom error class - to raise a NoTokenError
class TPNoTokenError(Exception):
@@ -107,7 +107,7 @@ def do_refresh_token(refreshtoken):
}
url = "https://oauth.sandbox.trainingpeaks.com/oauth/token"
url = "https://oauth.trainingpeaks.com/oauth/token"
response = requests.post(url,
data=post_data,
@@ -141,7 +141,7 @@ def get_token(code):
'Content-Type': 'application/x-www-form-urlencoded',
}
response = requests.post("https://oauth.sandbox.trainingpeaks.com/oauth/token",
response = requests.post("https://oauth.trainingpeaks.com/oauth/token",
data=post_data)
@@ -167,7 +167,7 @@ def make_authorization_url(request):
"redirect_uri": TP_REDIRECT_URI,
"scope": "file:write",
}
url = "https://oauth.sandbox.trainingpeaks.com/oauth/authorize?" +urllib.urlencode(params)
url = "https://oauth.trainingpeaks.com/oauth/authorize?" +urllib.urlencode(params)
return HttpResponseRedirect(url)