Skip to content

Commit 56e497c

Browse files
author
brentru
committed
fixs per sommersoft's review
1 parent 3ccab41 commit 56e497c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

adafruit_io/adafruit_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, adafruit_io_username, adafruit_io_key, wifi_manager):
5656
"""
5757
self.username = adafruit_io_username
5858
self.key = adafruit_io_key
59-
if wifi_manager:
59+
if isinstance(wifi, adafruit_esp32spi_wifimanager.ESPSPI_WiFiManager):
6060
self.wifi = wifi_manager
6161
else:
6262
raise TypeError("This library requires a WiFiManager object.")
@@ -89,7 +89,7 @@ def _compose_path(self, path):
8989
"""Composes a valid API request path.
9090
:param str path: Adafruit IO API URL path.
9191
"""
92-
return "{0}/{1}/{2}/{3}".format('https://io.adafruit.com/api', 'v2', self.username, path)
92+
return "https://io.adafruit.com/api/v2/{0}/{1}".format(self.username, path)
9393

9494
# HTTP Requests
9595
def _post(self, path, payload):

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ API
55
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
66
.. use this format as the module name: "adafruit_foo.foo"
77
8-
.. automodule:: adafruit_io
8+
.. automodule:: adafruit_io.adafruit_io
99
:members:

0 commit comments

Comments
 (0)