From 7facaf227dc690666242825556d857a6a51cbda9 Mon Sep 17 00:00:00 2001 From: kavinaidoo <83715825+kavinaidoo@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:49:45 +0200 Subject: [PATCH] corrections to receive_n_data documentation receive_n_data - added missing n_values :param - changed description for more accurate wording validate_n_values - changed description for better formatting in docs --- adafruit_io/adafruit_io.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adafruit_io/adafruit_io.py b/adafruit_io/adafruit_io.py index cdb6d56..67b014c 100755 --- a/adafruit_io/adafruit_io.py +++ b/adafruit_io/adafruit_io.py @@ -58,8 +58,7 @@ def validate_n_values(n_values: int): """Validates a provided number of values to retrieve data from Adafruit IO. Although Adafruit IO will accept values < 1 and > 1000, this avoids two types of issues: - <1 - Coding errors - >1000 - Pagination-related expectation management + n_values < 1 (coding errors) and n_values > 1000 (pagination required for HTTP API) """ if n_values < 1 or n_values > 1000: # validate 0 < n_values <= 1000 @@ -649,10 +648,11 @@ def receive_all_data(self, feed_key: str): def receive_n_data(self, feed_key: str, n_values: int): """ - Get n data values from a specified Adafruit IO feed. Data is + Get most recent n data values from a specified feed. Data is returned in reverse order. :param str feed_key: Adafruit IO feed key + :param int n_values: Number of data values """ validate_n_values(n_values) validate_feed_key(feed_key)