Skip to content

Commit 3ced1e3

Browse files
author
brentru
committed
Add Adafruit IO Connected Service: Random Data
1 parent fa98981 commit 3ced1e3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

adafruit_io.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,18 @@ def delete_feed(self, feed_key):
235235
# Adafruit IO Connected Services
236236
def receive_weather(self, weather_id):
237237
"""
238-
Adafruit IO Weather Forecast Service
238+
Get data from the Adafruit IO Weather Forecast Service
239239
NOTE: This service is avaliable to Adafruit IO Plus subscribers only.
240240
:param int weather_id: ID for retrieving a specified weather record.
241241
"""
242242
path = self._compose_path("integrations/weather/{0}".format(weather_id))
243243
return self._get(path)
244+
245+
def receive_random_data(self, generator_id):
246+
"""
247+
Get data from the Adafruit IO Random Data Stream Service
248+
:param int generator_id: Specified randomizer record
249+
"""
250+
path = self._compose_path("integrations/words/{0}".format(generator_id))
251+
return self._get(path)
252+

0 commit comments

Comments
 (0)