From 66a5266ee3c999191ac8ecbe91c43eef3de6c3d1 Mon Sep 17 00:00:00 2001 From: brentru Date: Mon, 11 Mar 2019 12:34:48 -0400 Subject: [PATCH 1/2] update adafruit_io -> aio in examples to work with secrets.py --- examples/adafruit_io_simpletest_analog_in.py | 4 ++-- examples/adafruit_io_simpletest_data.py | 4 ++-- examples/adafruit_io_simpletest_digital_out.py | 4 ++-- examples/adafruit_io_simpletest_esp_at.py | 4 ++-- examples/adafruit_io_simpletest_feeds.py | 4 ++-- examples/adafruit_io_simpletest_groups.py | 4 ++-- examples/adafruit_io_simpletest_metadata.py | 4 ++-- examples/adafruit_io_simpletest_randomizer.py | 4 ++-- examples/adafruit_io_simpletest_temperature.py | 4 ++-- examples/adafruit_io_simpletest_weather.py | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/adafruit_io_simpletest_analog_in.py b/examples/adafruit_io_simpletest_analog_in.py index b44bd02..28e4b64 100644 --- a/examples/adafruit_io_simpletest_analog_in.py +++ b/examples/adafruit_io_simpletest_analog_in.py @@ -51,8 +51,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_data.py b/examples/adafruit_io_simpletest_data.py index 78908f5..e003b9f 100644 --- a/examples/adafruit_io_simpletest_data.py +++ b/examples/adafruit_io_simpletest_data.py @@ -48,8 +48,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_digital_out.py b/examples/adafruit_io_simpletest_digital_out.py index 57e3e61..b8cc25b 100644 --- a/examples/adafruit_io_simpletest_digital_out.py +++ b/examples/adafruit_io_simpletest_digital_out.py @@ -49,8 +49,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_esp_at.py b/examples/adafruit_io_simpletest_esp_at.py index 2025037..4c2a3e8 100644 --- a/examples/adafruit_io_simpletest_esp_at.py +++ b/examples/adafruit_io_simpletest_esp_at.py @@ -59,8 +59,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_feeds.py b/examples/adafruit_io_simpletest_feeds.py index ae2e502..be73617 100644 --- a/examples/adafruit_io_simpletest_feeds.py +++ b/examples/adafruit_io_simpletest_feeds.py @@ -47,8 +47,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_groups.py b/examples/adafruit_io_simpletest_groups.py index dcdb8f1..6aec56f 100644 --- a/examples/adafruit_io_simpletest_groups.py +++ b/examples/adafruit_io_simpletest_groups.py @@ -47,8 +47,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_metadata.py b/examples/adafruit_io_simpletest_metadata.py index 6145f4c..33d5dce 100644 --- a/examples/adafruit_io_simpletest_metadata.py +++ b/examples/adafruit_io_simpletest_metadata.py @@ -48,8 +48,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_randomizer.py b/examples/adafruit_io_simpletest_randomizer.py index 7010fa7..9722388 100644 --- a/examples/adafruit_io_simpletest_randomizer.py +++ b/examples/adafruit_io_simpletest_randomizer.py @@ -49,8 +49,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_temperature.py b/examples/adafruit_io_simpletest_temperature.py index 63f8c5f..bd9941b 100644 --- a/examples/adafruit_io_simpletest_temperature.py +++ b/examples/adafruit_io_simpletest_temperature.py @@ -56,8 +56,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) diff --git a/examples/adafruit_io_simpletest_weather.py b/examples/adafruit_io_simpletest_weather.py index 3b9ac82..e57ca4e 100644 --- a/examples/adafruit_io_simpletest_weather.py +++ b/examples/adafruit_io_simpletest_weather.py @@ -50,8 +50,8 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['adafruit_io_user'] -ADAFRUIT_IO_KEY = secrets['adafruit_io_key'] +ADAFRUIT_IO_USER = secrets['aio_username'] +ADAFRUIT_IO_KEY = secrets['aio_key'] # Create an instance of the Adafruit IO REST client io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) From dbc0ffdb553b9f004bfa37f5cb25582774612408 Mon Sep 17 00:00:00 2001 From: brentru Date: Mon, 11 Mar 2019 12:41:46 -0400 Subject: [PATCH 2/2] ADAFRUIT_IO_USERNAME/KEY -> aio_username/key --- README.rst | 2 +- examples/adafruit_io_simpletest_analog_in.py | 6 +++--- examples/adafruit_io_simpletest_data.py | 6 +++--- examples/adafruit_io_simpletest_digital_out.py | 6 +++--- examples/adafruit_io_simpletest_esp_at.py | 6 +++--- examples/adafruit_io_simpletest_feeds.py | 6 +++--- examples/adafruit_io_simpletest_groups.py | 6 +++--- examples/adafruit_io_simpletest_metadata.py | 6 +++--- examples/adafruit_io_simpletest_randomizer.py | 6 +++--- examples/adafruit_io_simpletest_temperature.py | 6 +++--- examples/adafruit_io_simpletest_weather.py | 6 +++--- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README.rst b/README.rst index dd6057c..52d2850 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ Create an Adafruit IO Client object .. code-block:: python - io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) + io = RESTClient(aio_username, aio_key, wifi) Sending data to an Adafruit IO feed diff --git a/examples/adafruit_io_simpletest_analog_in.py b/examples/adafruit_io_simpletest_analog_in.py index 28e4b64..569c9b4 100644 --- a/examples/adafruit_io_simpletest_analog_in.py +++ b/examples/adafruit_io_simpletest_analog_in.py @@ -51,11 +51,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) try: # Get the 'light' feed from Adafruit IO diff --git a/examples/adafruit_io_simpletest_data.py b/examples/adafruit_io_simpletest_data.py index e003b9f..a24f28f 100644 --- a/examples/adafruit_io_simpletest_data.py +++ b/examples/adafruit_io_simpletest_data.py @@ -48,11 +48,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) try: # Get the 'temperature' feed from Adafruit IO diff --git a/examples/adafruit_io_simpletest_digital_out.py b/examples/adafruit_io_simpletest_digital_out.py index b8cc25b..fe46bc7 100644 --- a/examples/adafruit_io_simpletest_digital_out.py +++ b/examples/adafruit_io_simpletest_digital_out.py @@ -49,11 +49,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) try: # Get the 'digital' feed from Adafruit IO diff --git a/examples/adafruit_io_simpletest_esp_at.py b/examples/adafruit_io_simpletest_esp_at.py index 4c2a3e8..f75eb29 100644 --- a/examples/adafruit_io_simpletest_esp_at.py +++ b/examples/adafruit_io_simpletest_esp_at.py @@ -59,11 +59,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) try: # Get the 'temperature' feed from Adafruit IO diff --git a/examples/adafruit_io_simpletest_feeds.py b/examples/adafruit_io_simpletest_feeds.py index be73617..cf45f57 100644 --- a/examples/adafruit_io_simpletest_feeds.py +++ b/examples/adafruit_io_simpletest_feeds.py @@ -47,11 +47,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) # Create a new 'circuitpython' feed with a description print('Creating new Adafruit IO feed...') diff --git a/examples/adafruit_io_simpletest_groups.py b/examples/adafruit_io_simpletest_groups.py index 6aec56f..a542d4b 100644 --- a/examples/adafruit_io_simpletest_groups.py +++ b/examples/adafruit_io_simpletest_groups.py @@ -47,11 +47,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) # Create a new group print('Creating a new Adafruit IO Group...') diff --git a/examples/adafruit_io_simpletest_metadata.py b/examples/adafruit_io_simpletest_metadata.py index 33d5dce..2b3ba6d 100644 --- a/examples/adafruit_io_simpletest_metadata.py +++ b/examples/adafruit_io_simpletest_metadata.py @@ -48,11 +48,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) try: # Get the 'location' feed from Adafruit IO diff --git a/examples/adafruit_io_simpletest_randomizer.py b/examples/adafruit_io_simpletest_randomizer.py index 9722388..2324f2c 100644 --- a/examples/adafruit_io_simpletest_randomizer.py +++ b/examples/adafruit_io_simpletest_randomizer.py @@ -49,11 +49,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) # Random Data ID # (to obtain this value, visit diff --git a/examples/adafruit_io_simpletest_temperature.py b/examples/adafruit_io_simpletest_temperature.py index bd9941b..a0cae64 100644 --- a/examples/adafruit_io_simpletest_temperature.py +++ b/examples/adafruit_io_simpletest_temperature.py @@ -56,11 +56,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) try: # Get the 'temperature' feed from Adafruit IO diff --git a/examples/adafruit_io_simpletest_weather.py b/examples/adafruit_io_simpletest_weather.py index e57ca4e..32cce3f 100644 --- a/examples/adafruit_io_simpletest_weather.py +++ b/examples/adafruit_io_simpletest_weather.py @@ -50,11 +50,11 @@ # Set your Adafruit IO Username and Key in secrets.py # (visit io.adafruit.com if you need to create an account, # or if you need your Adafruit IO key.) -ADAFRUIT_IO_USER = secrets['aio_username'] -ADAFRUIT_IO_KEY = secrets['aio_key'] +aio_username = secrets['aio_username'] +aio_key = secrets['aio_key'] # Create an instance of the Adafruit IO REST client -io = RESTClient(ADAFRUIT_IO_USER, ADAFRUIT_IO_KEY, wifi) +io = RESTClient(aio_username, aio_key, wifi) # Weather Location ID # (to obtain this value, visit