Skip to content

Commit d67fcc8

Browse files
author
brentru
committed
replace IO REST with IO HTTP to match IO MQTT client name, remove deps
1 parent efeb8df commit d67fcc8

11 files changed

+138
-112
lines changed

adafruit_io/adafruit_io.py

Lines changed: 98 additions & 72 deletions
Large diffs are not rendered by default.

examples/adafruit_io_simpletest_analog_in.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# Import NeoPixel Library
1313
import neopixel
1414

15-
# Import Adafruit IO REST Client
16-
from adafruit_io.adafruit_io import RESTClient, AdafruitIO_RequestError
15+
# Import Adafruit IO HTTP Client
16+
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
1717

1818
# Delay between polling and sending light sensor data, in seconds
1919
SENSOR_DELAY = 30
@@ -48,8 +48,8 @@
4848
aio_username = secrets['aio_username']
4949
aio_key = secrets['aio_key']
5050

51-
# Create an instance of the Adafruit IO REST client
52-
io = RESTClient(aio_username, aio_key, wifi)
51+
# Create an instance of the Adafruit IO HTTP client
52+
io = IO_HTTP(aio_username, aio_key, wifi)
5353

5454
try:
5555
# Get the 'light' feed from Adafruit IO

examples/adafruit_io_simpletest_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# Import NeoPixel Library
1313
import neopixel
1414

15-
# Import Adafruit IO REST Client
16-
from adafruit_io.adafruit_io import RESTClient, AdafruitIO_RequestError
15+
# Import Adafruit IO HTTP Client
16+
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
1717

1818
# Get wifi details and more from a secrets.py file
1919
try:
@@ -45,8 +45,8 @@
4545
aio_username = secrets['aio_username']
4646
aio_key = secrets['aio_key']
4747

48-
# Create an instance of the Adafruit IO REST client
49-
io = RESTClient(aio_username, aio_key, wifi)
48+
# Create an instance of the Adafruit IO HTTP client
49+
io = IO_HTTP(aio_username, aio_key, wifi)
5050

5151
try:
5252
# Get the 'temperature' feed from Adafruit IO

examples/adafruit_io_simpletest_digital_out.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# Import NeoPixel Library
1414
import neopixel
1515

16-
# Import Adafruit IO REST Client
17-
from adafruit_io.adafruit_io import RESTClient, AdafruitIO_RequestError
16+
# Import Adafruit IO HTTP Client
17+
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
1818

1919
# Get wifi details and more from a secrets.py file
2020
try:
@@ -46,8 +46,8 @@
4646
aio_username = secrets['aio_username']
4747
aio_key = secrets['aio_key']
4848

49-
# Create an instance of the Adafruit IO REST client
50-
io = RESTClient(aio_username, aio_key, wifi)
49+
# Create an instance of the Adafruit IO HTTP client
50+
io = IO_HTTP(aio_username, aio_key, wifi)
5151

5252
try:
5353
# Get the 'digital' feed from Adafruit IO

examples/adafruit_io_simpletest_esp_at.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import busio
1111
from digitalio import DigitalInOut
1212

13-
# Import Adafruit IO REST Client
14-
from adafruit_io.adafruit_io import RESTClient, AdafruitIO_RequestError
13+
# Import Adafruit IO HTTP Client
14+
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
1515

1616
# ESP32 AT
1717
from adafruit_espatcontrol import adafruit_espatcontrol, adafruit_espatcontrol_wifimanager
@@ -62,8 +62,8 @@
6262
aio_username = secrets['aio_username']
6363
aio_key = secrets['aio_key']
6464

65-
# Create an instance of the Adafruit IO REST client
66-
io = RESTClient(aio_username, aio_key, wifi)
65+
# Create an instance of the Adafruit IO HTTP client
66+
io = IO_HTTP(aio_username, aio_key, wifi)
6767

6868
try:
6969
# Get the 'temperature' feed from Adafruit IO

examples/adafruit_io_simpletest_feeds.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# Import NeoPixel Library
1212
import neopixel
1313

14-
# Import Adafruit IO REST Client
15-
from adafruit_io.adafruit_io import RESTClient
14+
# Import Adafruit IO HTTP Client
15+
from adafruit_io.adafruit_io import IO_HTTP
1616

1717
# Get wifi details and more from a secrets.py file
1818
try:
@@ -44,8 +44,8 @@
4444
aio_username = secrets['aio_username']
4545
aio_key = secrets['aio_key']
4646

47-
# Create an instance of the Adafruit IO REST client
48-
io = RESTClient(aio_username, aio_key, wifi)
47+
# Create an instance of the Adafruit IO HTTP client
48+
io = IO_HTTP(aio_username, aio_key, wifi)
4949

5050
# Create a new 'circuitpython' feed with a description
5151
print('Creating new Adafruit IO feed...')

examples/adafruit_io_simpletest_groups.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# Import NeoPixel Library
1212
import neopixel
1313

14-
# Import Adafruit IO REST Client
15-
from adafruit_io.adafruit_io import RESTClient
14+
# Import Adafruit IO HTTP Client
15+
from adafruit_io.adafruit_io import IO_HTTP
1616

1717
# Get wifi details and more from a secrets.py file
1818
try:
@@ -43,8 +43,8 @@
4343
aio_username = secrets['aio_username']
4444
aio_key = secrets['aio_key']
4545

46-
# Create an instance of the Adafruit IO REST client
47-
io = RESTClient(aio_username, aio_key, wifi)
46+
# Create an instance of the Adafruit IO HTTP client
47+
io = IO_HTTP(aio_username, aio_key, wifi)
4848

4949
# Create a new group
5050
print('Creating a new Adafruit IO Group...')

examples/adafruit_io_simpletest_metadata.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# Import NeoPixel Library
1313
import neopixel
1414

15-
# Import Adafruit IO REST Client
16-
from adafruit_io.adafruit_io import RESTClient, AdafruitIO_RequestError
15+
# Import Adafruit IO HTTP Client
16+
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
1717

1818
# Get wifi details and more from a secrets.py file
1919
try:
@@ -45,8 +45,8 @@
4545
aio_username = secrets['aio_username']
4646
aio_key = secrets['aio_key']
4747

48-
# Create an instance of the Adafruit IO REST client
49-
io = RESTClient(aio_username, aio_key, wifi)
48+
# Create an instance of the Adafruit IO HTTP client
49+
io = IO_HTTP(aio_username, aio_key, wifi)
5050

5151
try:
5252
# Get the 'location' feed from Adafruit IO

examples/adafruit_io_simpletest_randomizer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# Import NeoPixel Library
1414
import neopixel
1515

16-
# Import Adafruit IO REST Client
17-
from adafruit_io.adafruit_io import RESTClient
16+
# Import Adafruit IO HTTP Client
17+
from adafruit_io.adafruit_io import IO_HTTP
1818

1919
# Get wifi details and more from a secrets.py file
2020
try:
@@ -46,8 +46,8 @@
4646
aio_username = secrets['aio_username']
4747
aio_key = secrets['aio_key']
4848

49-
# Create an instance of the Adafruit IO REST client
50-
io = RESTClient(aio_username, aio_key, wifi)
49+
# Create an instance of the Adafruit IO HTTP client
50+
io = IO_HTTP(aio_username, aio_key, wifi)
5151

5252
# Random Data ID
5353
# (to obtain this value, visit

examples/adafruit_io_simpletest_temperature.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# Import NeoPixel Library
1818
import neopixel
1919

20-
# Import Adafruit IO REST Client
21-
from adafruit_io.adafruit_io import RESTClient, AdafruitIO_RequestError
20+
# Import Adafruit IO HTTP Client
21+
from adafruit_io.adafruit_io import IO_HTTP, AdafruitIO_RequestError
2222

2323
# Import ADT7410 Library
2424
import adafruit_adt7410
@@ -53,8 +53,8 @@
5353
aio_username = secrets['aio_username']
5454
aio_key = secrets['aio_key']
5555

56-
# Create an instance of the Adafruit IO REST client
57-
io = RESTClient(aio_username, aio_key, wifi)
56+
# Create an instance of the Adafruit IO HTTP client
57+
io = IO_HTTP(aio_username, aio_key, wifi)
5858

5959
try:
6060
# Get the 'temperature' feed from Adafruit IO

0 commit comments

Comments
 (0)