Skip to content

Commit

Permalink
Includes limit parameter for clicked items
Browse files Browse the repository at this point in the history
  • Loading branch information
mdogo committed Jan 26, 2021
1 parent 78c9778 commit 119e747
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pydoof/management_api/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand All @@ -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_
})
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='[email protected]',
description="Doofinder's search & management API client",
url='https://github.com/doofinder/pydoof',
Expand Down
6 changes: 3 additions & 3 deletions tests/management_api/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 119e747

Please sign in to comment.