Skip to content

Commit e94e2d4

Browse files
committed
Add params keyword argument to _get method to enable use of URL parameters.
1 parent 617c5a4 commit e94e2d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Adafruit_IO/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ def _handle_error(response):
111111
def _compose_url(self, path):
112112
return '{0}/api/{1}/{2}/{3}'.format(self.base_url, 'v2', self.username, path)
113113

114-
def _get(self, path):
114+
def _get(self, path, params=None):
115115
response = requests.get(self._compose_url(path),
116116
headers=self._headers({'X-AIO-Key': self.key}),
117-
proxies=self.proxies)
117+
proxies=self.proxies,
118+
params=params)
118119
self._handle_error(response)
119120
return response.json()
120121

0 commit comments

Comments
 (0)