66from typing import List , Union
77import time
88
9+
910from . import models
1011from .sdk .api .default_api import DefaultApi
1112from .errors import InvalidArgumentException
1213from .helpers import arguments
1314from .helpers import requests
1415from .helpers .generators import get_list_chunks
16+ from .helpers .items import get_items_including_unavailable
1517
1618
1719class AmazonApi :
@@ -54,6 +56,7 @@ def get_items(
5456 merchant : models .Merchant = None ,
5557 currency_of_preference : str = None ,
5658 languages_of_preference : List [str ] = None ,
59+ include_unavailable : bool = False ,
5760 ** kwargs
5861 ) -> List [models .Item ]:
5962
@@ -70,6 +73,8 @@ def get_items(
7073 information should be returned. Expected currency code format is ISO 4217.
7174 languages_of_preference (``list[str]``, optional): Languages in order of preference in
7275 which the item information should be returned.
76+ include_unavailable (``bool``, optional): The returned list includes not available
77+ items. Not available items have the ASIN and item_info equals None. Defaults to False.
7378 kwargs (``dict``, optional): Any other arguments to be passed to the Amazon API.
7479
7580 Returns:
@@ -98,6 +103,9 @@ def get_items(
98103 items_response = requests .get_items_response (self , request )
99104 results .extend (items_response )
100105
106+ if include_unavailable :
107+ results = get_items_including_unavailable (results , items_ids )
108+
101109 return results
102110
103111
0 commit comments