diff --git a/pydoof/management_api/stats.py b/pydoof/management_api/stats.py index e46b199..7d8f9db 100644 --- a/pydoof/management_api/stats.py +++ b/pydoof/management_api/stats.py @@ -88,8 +88,8 @@ def clicks(from_, to, hashids=None, device=None, tz=None, format_=None, ) -def clicked_items(from_, to, hashids=None, query=None, device=None, tz=None, - format_=None, **opts): +def clicked_items(from_, to, hashids=None, query=None, device=None, limit=None, + tz=None, format_=None, **opts): """ Returns most commonly clicked items in a period. """ @@ -99,6 +99,7 @@ def clicked_items(from_, to, hashids=None, query=None, device=None, tz=None, 'hashid': hashids, 'query': query, 'device': device, + 'limit': limit, 'tz': tz, 'format': format_ }) diff --git a/setup.py b/setup.py index 3ad08c5..4d07d01 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ long_description = file.read() -setup(name='PyDoof', version='3.3.1', author='Doofinder', +setup(name='PyDoof', version='3.3.2', author='Doofinder', author_email='support@doofinder.com', description="Doofinder's search & management API client", url='https://github.com/doofinder/pydoof', diff --git a/tests/management_api/test_stats.py b/tests/management_api/test_stats.py index 13187ec..5d25cd1 100644 --- a/tests/management_api/test_stats.py +++ b/tests/management_api/test_stats.py @@ -33,11 +33,11 @@ def _stats_test_cases(): 'device': 'desktop', 'tz': '+01:00', 'format': 'json'})), (clicked_items, {'query': 'QUERY', 'from_': '20200810', 'to': '20200910', - 'hashids': ['aab32d8'], 'device': Devices.DESKTOP, 'tz': '+01:00', - 'format_': Formats.JSON}, + 'hashids': ['aab32d8'], 'device': Devices.DESKTOP, 'limit': 50, + 'tz': '+01:00', 'format_': Formats.JSON}, ('/api/v2/stats/clicked_items', {'from': '20200810', 'to': '20200910', 'hashid[]': 'aab32d8', - 'query': 'QUERY', 'device': 'desktop', 'tz': '+01:00', + 'query': 'QUERY', 'device': 'desktop', 'limit': 50, 'tz': '+01:00', 'format': 'json'})), (clicked_items_searches, {'dfid': 'aab32d8@product@43ef82', 'from_': '20200810',