Skip to content

Commit 7512838

Browse files
authored
Merge pull request #114 from kavinaidoo/main
Corrections to receive_n_data documentation
2 parents 6ba69d7 + 7facaf2 commit 7512838

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_io/adafruit_io.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ def validate_n_values(n_values: int):
5858
"""Validates a provided number of values to retrieve data from Adafruit IO.
5959
6060
Although Adafruit IO will accept values < 1 and > 1000, this avoids two types of issues:
61-
<1 - Coding errors
62-
>1000 - Pagination-related expectation management
61+
n_values < 1 (coding errors) and n_values > 1000 (pagination required for HTTP API)
6362
6463
"""
6564
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):
649648

650649
def receive_n_data(self, feed_key: str, n_values: int):
651650
"""
652-
Get n data values from a specified Adafruit IO feed. Data is
651+
Get most recent n data values from a specified feed. Data is
653652
returned in reverse order.
654653
655654
:param str feed_key: Adafruit IO feed key
655+
:param int n_values: Number of data values
656656
"""
657657
validate_n_values(n_values)
658658
validate_feed_key(feed_key)

0 commit comments

Comments
 (0)