11"""Module with helper functions for managing arguments."""
22
33
4- from ..tools import get_asin
5- from ..errors import InvalidArgumentException , AsinNotFoundException
64from typing import List , Union
75
6+ from ..errors import AsinNotFoundException , InvalidArgumentException
7+ from ..tools import get_asin
8+
89
910def get_items_ids (items : Union [str , List [str ]]) -> List [str ]:
1011 if not isinstance (items , str ) and not isinstance (items , List ):
@@ -30,10 +31,11 @@ def check_search_args(**kwargs):
3031
3132def _check_search_mandatory_args (** kwargs ):
3233 mandatory_args = [kwargs ['keywords' ], kwargs ['actor' ], kwargs ['artist' ],
33- kwargs ['author' ],kwargs ['brand' ], kwargs ['title' ]]
34+ kwargs ['author' ], kwargs ['brand' ], kwargs ['title' ],
35+ kwargs ['browse_node_id' ]]
3436 if all (arg is None for arg in mandatory_args ):
3537 error_message = ('At least one of the following args should be provided: '
36- 'keywords, actor, artist, author, brand or title .' )
38+ 'keywords, actor, artist, author, brand, title or browse_node_id .' )
3739 raise InvalidArgumentException (error_message )
3840
3941
0 commit comments