Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit e45f0d7

Browse files
committed
Review feedback
1 parent 5397e56 commit e45f0d7

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**#** Getting started with the OneDrive SDK for Python
1+
# Getting started with the OneDrive SDK for Python
22

33
------------------------------------------------------------------------
44
[![Build status](https://ci.appveyor.com/api/projects/status/x1cjahp817w6r455?svg=true)](https://ci.appveyor.com/project/OneDrive/vroom-client-python)
@@ -77,6 +77,10 @@ app must first use the Resource Discovery helper to find out which service you c
7777
Then, you can build a client to access those resources.
7878

7979
```python
80+
import onedrivesdk
81+
from onedrivesdk.helpers import GetAuthCodeServer
82+
from onedrivesdk.helpers.resource_discovery import ResourceDiscoveryRequest
83+
8084
redirect_uri = 'http://localhost:8080'
8185
client_id = your_client_id
8286
client_secret = your_client_secret

src/onedrivesdk/auth_provider.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ def access_token(self):
114114
AuthProvider
115115
116116
Returns:
117-
str: The access token. Looks at the session
117+
str: The access token. Looks at the session to figure out what the access token is, since this
118+
class does not directly store the access token.
118119
"""
119120
if self._session is not None:
120121
return self._session.access_token
@@ -178,8 +179,7 @@ def authenticate(self, code, redirect_uri, client_secret, resource=None):
178179
The code provided by the oauth provider.
179180
redirect_uri (str): The URI to redirect the callback
180181
to
181-
client_secret (str): The client secret of your app. Only needed
182-
if code is not None
182+
client_secret (str): The client secret of your app.
183183
resource (str): Defaults to None,The resource
184184
you want to access
185185
"""
@@ -208,7 +208,7 @@ def authenticate(self, code, redirect_uri, client_secret, resource=None):
208208
rcont["scope"],
209209
rcont["access_token"],
210210
self.client_id,
211-
self._auth_token_url if code is not None else self._auth_server_url,
211+
self._auth_token_url,
212212
redirect_uri,
213213
rcont["refresh_token"] if "refresh_token" in rcont else None,
214214
client_secret)

0 commit comments

Comments
 (0)