HubSpot/hapipy — pull request #23 by adrianmott (2012-03-13 20:53:26+00:00)
Title: Adding (optional) OAuth support to the wrapper

Modified the wrapper to enable folks to use OAuth access_tokens as needed with the wrapper. It also refreshes tokens for offline apps if refresh_tokens and client_id are present. All tests are passing in my testing under the following criteria:

- provide a valid hapikey (change the options dict in helper.py to test these...)
- provide a valid access_token
- provide an invalid access_token (expired or invalid) with a refresh token and client ID (in this case, the wrapper will refresh the token).