Browse Source

redirect_url => uri

pull/161/head
Luke 6 years ago
parent
commit
bcd3b625c2
  1. 4
      disco/api/client.py

4
disco/api/client.py

@ -106,7 +106,7 @@ class APIClient(LoggingClass):
data = self.http(Routes.GATEWAY_BOT_GET).json() data = self.http(Routes.GATEWAY_BOT_GET).json()
return data return data
def oauth2_token_get(self, grant_type, scope, code=None, refresh_token=None, redirect_url=None): def oauth2_token_get(self, grant_type, scope, code=None, refresh_token=None, redirect_uri=None):
payload = { payload = {
'client_id': self.client.state.me.id, 'client_id': self.client.state.me.id,
'client_secret': self.client.config.secret, 'client_secret': self.client.config.secret,
@ -116,7 +116,7 @@ class APIClient(LoggingClass):
payload.update(optional( payload.update(optional(
code=code, code=code,
refresh_token=refresh_token, refresh_token=refresh_token,
redirect_url=redirect_url, redirect_uri=redirect_uri,
)) ))
r = self.http(Routes.OAUTH2_TOKEN, data=payload) r = self.http(Routes.OAUTH2_TOKEN, data=payload)
return AccessToken.create(self.client, r.json()) return AccessToken.create(self.client, r.json())

Loading…
Cancel
Save