Skip to content

Commit

Permalink
Update documentation for Python 3 (#435)
Browse files Browse the repository at this point in the history
* Update documentation for Python 3

Given that Python 2 is out of support, the documenation examples should probably use Python 3 syntax (i.e. print as a function, input instead of raw_input) instead of Python 2 syntax.

* whitespace change

Co-authored-by: jtroussard <[email protected]>
  • Loading branch information
gschizas and jtroussard authored Dec 30, 2021
1 parent 9c1f83f commit ee20855
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/examples/outlook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ a callback URL then you can try out the command line interactive example below.
>>> # Redirect the user owner to the OAuth provider (i.e. Outlook) using an URL with a few key OAuth parameters.
>>> authorization_url, state = outlook.authorization_url(authorization_base_url)
>>> print 'Please go here and authorize,', authorization_url
>>> print('Please go here and authorize,', authorization_url)
>>> # Get the authorization verifier code from the callback url
>>> redirect_response = raw_input('Paste the full redirect URL here:')
>>> redirect_response = input('Paste the full redirect URL here:')
>>> # Fetch the access token
>>> token = outlook.fetch_token(token_url,client_secret=client_secret,authorization_response=redirect_response)
>>> token = outlook.fetch_token(token_url, client_secret=client_secret, authorization_response=redirect_response)
>>> # Fetch a protected resource, i.e. calendar information
>>> o = outlook.get('https://outlook.office.com/api/v1.0/me/calendars')
>>> print o.content
>>> print(o.content)

0 comments on commit ee20855

Please sign in to comment.