File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -167,10 +167,21 @@ def receive_weather(self, weather_id=None):
167167 :param int id: optional ID for retrieving a specified weather record.
168168 """
169169 if weather_id :
170- weatherpath = "integrations/weather/{0}" .format (weather_id )
170+ weather_path = "integrations/weather/{0}" .format (weather_id )
171171 else :
172- weatherpath = "integrations/weather"
173- return self ._get (weatherpath )
172+ weather_path = "integrations/weather"
173+ return self ._get (weather_path )
174+
175+ def receive_random (self , id = None ):
176+ """Access to Adafruit IO's Random Data
177+ service.
178+ :param int id: optional ID for retrieving a specified randomizer.
179+ """
180+ if id :
181+ random_path = "integrations/words/{0}" .format (id )
182+ else :
183+ random_path = "integrations/words"
184+ return self ._get (random_path )
174185
175186 def receive (self , feed ):
176187 """Retrieve the most recent value for the specified feed. Returns a Data
You can’t perform that action at this time.
0 commit comments