Skip to content

Commit 0c7845a

Browse files
author
brentru
committed
remove api version kwarg
1 parent 608105d commit 0c7845a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Adafruit_IO/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.1.2"
1+
__version__ = "2.1.3"

Adafruit_IO/client.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,28 @@ class Client(object):
4242
REST API. Use this client class to send, receive, and enumerate feed data.
4343
"""
4444

45-
def __init__(self, username, key, proxies=None, base_url='https://io.adafruit.com', api_version = 'v2'):
45+
def __init__(self, username, key, proxies=None, base_url='https://io.adafruit.com'):
4646
"""Create an instance of the Adafruit IO REST API client. Key must be
4747
provided and set to your Adafruit IO access key value. Optionaly
48-
provide a proxies dict in the format used by the requests library, a
49-
base_url to point at a different Adafruit IO service (the default is
50-
the production Adafruit IO service over SSL), and a api_version to
51-
add support for future API versions.
48+
provide a proxies dict in the format used by the requests library,
49+
and a base_url to point at a different Adafruit IO service
50+
(the default is the production Adafruit IO service over SSL).
5251
"""
5352
self.username = username
5453
self.key = key
5554
self.proxies = proxies
56-
self.api_version = api_version
5755
# self.logger = logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
5856

5957
# Save URL without trailing slash as it will be added later when
6058
# constructing the path.
6159
self.base_url = base_url.rstrip('/')
6260

61+
6362
def _compose_url(self, path, is_time=None):
6463
if is_time: # return a call to https://io.adafruit.com/api/v2/time/{unit}
65-
return '{0}/api/{1}/{2}'.format(self.base_url, self.api_version, path)
64+
return '{0}/api/{1}/{2}'.format(self.base_url, 'v2', path)
6665
else:
67-
return '{0}/api/{1}/{2}/{3}'.format(self.base_url, self.api_version, self.username, path)
66+
return '{0}/api/{1}/{2}/{3}'.format(self.base_url, 'v2', self.username, path)
6867

6968

7069
def _handle_error(self, response):

0 commit comments

Comments
 (0)