Private
Public Access
1
0

refactoring importviews, part 1

This commit is contained in:
Sander Roosendaal
2023-02-16 08:39:27 +01:00
parent b179f3f9cf
commit f17fb560c5
10 changed files with 113 additions and 263 deletions

View File

@@ -40,6 +40,11 @@ class RP3Integration(SyncIntegration):
'scope': 'read,write',
}
def get_name(self):
return "RP3 Logbook"
def get_shortname(self):
return "rp3"
def createworkoutdata(self, w, *args, **kwargs):
return None
@@ -200,7 +205,14 @@ class RP3Integration(SyncIntegration):
def make_authorization_url(self, *args, **kwargs) -> str: # pragma: no cover
return super(RP3Integration, self).make_authorization_url(*args, **krags)
params = {"client_id": RP3_CLIENT_KEY,
"response_type": "code",
"redirect_uri": RP3_REDIRECT_URI,
}
url = "https://rp3rowing-app.com/oauth/authorize/?" + \
urllib.parse.urlencode(params)
return url
def get_token(self, code, *args, **kwargs) -> (str, int, str):
post_data = {