Skip to content

Commit

Permalink
adding search_products_as_admin_single_page
Browse files Browse the repository at this point in the history
  • Loading branch information
eamonnfaherty committed Jun 14, 2019
1 parent 315a896 commit 57e6254
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions betterboto/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@
logger = logging.getLogger(__file__)


def search_products_as_admin_single_page(self, **kwargs):
"""
This will continue to call search_products_as_admin until there are no more pages left to retrieve. It will return
the aggregated response in the same structure as search_products_as_admin does.
:param self: organizations client
:param kwargs: these are passed onto the search_products_as_admin method call
:return: organizations_client.search_products_as_admin.response
"""
return slurp(
'search_products_as_admin',
self.search_products_as_admin,
'ProductViewDetails',
**kwargs
)


def list_accounts_single_page(self, **kwargs):
"""
This will continue to call list_accounts until there are no more pages left to retrieve. It will return
Expand Down Expand Up @@ -169,4 +186,5 @@ def make_better(client):
client.list_children_single_page = types.MethodType(list_children_single_page, client)
client.list_children_nested = types.MethodType(list_children_nested, client)
client.list_organizational_units_for_parent_single_page = types.MethodType(list_organizational_units_for_parent_single_page, client)
client.search_products_as_admin_single_page = types.MethodType(search_products_as_admin_single_page, client)
return client
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name="better-boto",
version="0.7.0",
version="0.8.0",
author="Eamonn Faherty",
author_email="python-packages@designandsolve.co.uk",
description="Helpers to make using boto3 more enjoyable",
Expand Down

0 comments on commit 57e6254

Please sign in to comment.