Adafruit_IO_Python
Adafruit_IO_Python copied to clipboard
Groups: send multiple feeds data at once
@bradanlane mentioned on discord the desire to send data for multiple feeds at once. The API supports this but library does not. I equally wanted this multiple times in the past, and have now done an experimental PR which satisfies the need.
Could do with more severe testing, and I dislike that it fails if the groupname prefix is included in the feed key.
@lorennorman maybe we can make the API endpoint for groups/GROUPNAME/data allow the feeds datapoints to use a key that includes the group prefix as it causes a fatal error - I appreciate it's an unnecessary qualification including the prefix but also what IO returns for feed.key so very likely to be passed over by a user to the send method.
To test the error, just modify my new tests to not do the replace on group feed key here: https://github.com/adafruit/Adafruit_IO_Python/blob/ab8aad0b680ec929bf26cda917ada568153903c4/tests/test_client.py#L135-L138