Skip to content

Commit d452489

Browse files
authored
Merge pull request Clever#50 from Clever/update-readme
Update readme to correctly show how to set the token
2 parents 5b2f337 + ee08cad commit d452489

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ from pprint import pprint
4444

4545
# Note: This is hard coded for demo purposes only. Keep your access tokens secret!
4646
# https://dev.clever.com/docs/security#section-security-best-practices
47-
clever.configuration.access_token = 'TEST_TOKEN'
47+
48+
# Configure OAuth2 access token for authorization: oauth
49+
configuration = clever.Configuration()
50+
configuration.access_token = 'YOUR_ACCESS_TOKEN'
51+
4852
# create an instance of the API class
49-
api_instance = clever.DataApi()
53+
api_instance = clever.DataApi(clever.ApiClient(configuration))
5054

5155
try:
5256
api_response = api_instance.get_students()

override/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ from pprint import pprint
4444

4545
# Note: This is hard coded for demo purposes only. Keep your access tokens secret!
4646
# https://dev.clever.com/docs/security#section-security-best-practices
47-
clever.configuration.access_token = 'TEST_TOKEN'
47+
48+
# Configure OAuth2 access token for authorization: oauth
49+
configuration = clever.Configuration()
50+
configuration.access_token = 'YOUR_ACCESS_TOKEN'
51+
4852
# create an instance of the API class
49-
api_instance = clever.DataApi()
53+
api_instance = clever.DataApi(clever.ApiClient(configuration))
5054

5155
try:
5256
api_response = api_instance.get_students()

0 commit comments

Comments
 (0)