diff --git a/.travis.yml b/.travis.yml index a266ead..8418683 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ python: - pypy - pypy3.5 - 2.7 - - 3.4 - 3.5 - 3.6 # Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs diff --git a/CHANGELOG b/CHANGELOG index b84ab95..0b6e105 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +1.2.0 (2019-01-24) +================== + +- Add sleep summary API call + 1.1.0 (2018-10-16) ================== diff --git a/nokia/__init__.py b/nokia/__init__.py index 9fcbf45..283bc49 100644 --- a/nokia/__init__.py +++ b/nokia/__init__.py @@ -30,7 +30,7 @@ from __future__ import unicode_literals __title__ = 'nokia' -__version__ = '1.1.0' +__version__ = '1.2.0' __author__ = 'Maxime Bouroumeau-Fuseau, and ORCAS' __license__ = 'MIT' __copyright__ = 'Copyright 2012-2018 Maxime Bouroumeau-Fuseau, and ORCAS' @@ -48,7 +48,7 @@ class NokiaCredentials(object): def __init__(self, access_token=None, token_expiry=None, token_type=None, - refresh_token=None, user_id=None, + refresh_token=None, user_id=None, client_id=None, consumer_secret=None): self.access_token = access_token self.token_expiry = token_expiry @@ -83,8 +83,9 @@ def get_credentials(self, code): tokens = self._oauth().fetch_token( '%s/oauth2/token' % self.URL, code=code, - client_secret=self.consumer_secret) - + client_secret=self.consumer_secret, + include_client_id=True) + return NokiaCredentials( access_token=tokens['access_token'], token_expiry=str(ts()+int(tokens['expires_in'])), @@ -176,10 +177,10 @@ def __init__(self, credentials, refresh_cb=None): }, token_updater=self.set_token ) - + def get_credentials(self): return self.credentials - + def set_token(self, token): self.token = token self.credentials.token_expiry = str( diff --git a/requirements/base.txt b/requirements/base.txt index f13d9d8..964bf89 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ -arrow>=0.12,<0.13 +arrow>=0.12,<0.15 cherrypy>=17.3,<17.4 -requests>=2.19,<2.20 +requests>=2.20.0 requests-oauth>=0.4.1,<0.5 -requests-oauthlib>=1.0,<1.1 +requests-oauthlib>=1.2,<1.3 diff --git a/setup.py b/setup.py index 4d721d2..3cb12be 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='nokia', - version='1.1.0', + version='1.2.0', description="Library for the Nokia Health API", author='ORCAS', author_email='developer@orcasinc.com', diff --git a/tox.ini b/tox.ini index decfe1c..0623cb0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pypy,pypy3,py37,py36,py35,py34,py27 +envlist = pypy,pypy3,py37,py36,py35,py27 [testenv] commands = coverage run --branch --source=nokia setup.py test