Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #102 from tchellomello/0.2.2
Browse files Browse the repository at this point in the history
Version 0.2.2
  • Loading branch information
tchellomello committed Oct 21, 2018
2 parents 2dc9501 + 71b536d commit af86b3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions pyarlo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ def _authenticate(self):
"""Authenticate user and generate token."""
self.cleanup_headers()
url = LOGIN_ENDPOINT
data = self.query(url, method='POST')
data = self.query(
url,
method='POST',
extra_params={
'email': self.__username,
'password': self.__password
})

if isinstance(data, dict) and data.get('success'):
data = data.get('data')
Expand All @@ -82,9 +88,7 @@ def cleanup_headers(self):
headers = {'Content-Type': 'application/json'}
headers['Authorization'] = self.__token
self.__headers = headers

params = {'email': self.__username, 'password': self.__password}
self.__params = params
self.__params = {}

def query(self,
url,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def readme():
setup(
name='pyarlo',
packages=['pyarlo'],
version='0.2.1',
version='0.2.2',
description='Python Arlo is a library written in Python 2.7/3x ' +
'that exposes the Netgear Arlo cameras as Python objects.',
long_description=readme(),
Expand Down

0 comments on commit af86b3b

Please sign in to comment.