diff --git a/README.md b/README.md index 82c52ae..c00b869 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CheerLights Python Package +# CheerLights API Python Package A Python package to interact with the CheerLights API. It allows users to get the current CheerLights color, retrieve the color history, and perform various color-related utilities. diff --git a/cheerlights_api/__init__.py b/cheerlights_api/__init__.py index fe3d985..d05610a 100644 --- a/cheerlights_api/__init__.py +++ b/cheerlights_api/__init__.py @@ -1,4 +1,4 @@ -# cheerlights/__init__.py +# cheerlights_api/__init__.py from .cheerlights_api import ( get_current_color, diff --git a/cheerlights_api/cheerlights_api.py b/cheerlights_api/cheerlights_api.py index c47daa5..b8c894e 100644 --- a/cheerlights_api/cheerlights_api.py +++ b/cheerlights_api/cheerlights_api.py @@ -1,4 +1,4 @@ -# cheerlights/cheerlights_api.py +# cheerlights_api/cheerlights_api.py import requests @@ -11,7 +11,8 @@ def get_current_color(): Returns: dict: A dictionary with 'color' and 'hex' keys. """ - response = requests.get(CHEERLIGHTS_FEED_URL) + url = f"{CHEERLIGHTS_FEED_URL}?results=1" + response = requests.get(url) response.raise_for_status() data = response.json() color_name = data['feeds'][0]['field1'] @@ -45,7 +46,7 @@ def get_color_history(count=10): Get the history of CheerLights colors. Args: - count (int): The number of recent colors to retrieve. + count (int): The number of recent colors to retrieve (max 8000). Returns: list: A list of dictionaries with 'color', 'hex', and 'timestamp'. diff --git a/setup.py b/setup.py index dbc870a..3037f08 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name='cheerlights_api', - version='0.1.1', + version='0.1.2', description='A Python package to interact with the CheerLights API.', long_description=open('README.md').read(), long_description_content_type='text/markdown',