File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -273,11 +273,15 @@ def feeds(self, feed=None):
273
273
path = "feeds/{0}" .format (feed )
274
274
return Feed .from_dict (self ._get (path ))
275
275
276
- def create_feed (self , feed ):
276
+ def create_feed (self , feed , group_key = None ):
277
277
"""Create the specified feed.
278
- :param string feed: Name/Key/ID of Adafruit IO feed.
278
+ :param string feed: Key of Adafruit IO feed.
279
+ :param group_key group: Group to place new feed in.
279
280
"""
280
281
path = "feeds/"
282
+ if group_key is not None : # create feed in a group
283
+ path = "/groups/%s/feeds" % group_key
284
+ return Feed .from_dict (self ._post (path , {"feed" : feed ._asdict ()}))
281
285
return Feed .from_dict (self ._post (path , {"feed" : feed ._asdict ()}))
282
286
283
287
def delete_feed (self , feed ):
You can’t perform that action at this time.
0 commit comments