You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/CoderJoshDK/WIOpy)
[](https://github.com/CoderJoshDK/WIOpy)[](https://github.com/CoderJoshDK/WIOpy/issues)
-`search.facets` # Gives back a dict that can now be used like a dict and not object
50
58
Some attributes will return a dict and not an object due to a lack of documentation from Walmart.
51
59
When getting an attribute from a `WalmartResponse`, it will return either `response` or `None`\. But trying to get an attribute of `None` will still raise an error.
52
60
[Extra details on calls and responses](walmart.io/docs). However, the docs are inconsistent and lack typical practices such as response schema. That is why something like the search facets response is missing because the docs show it is in the response but not what type of data it will contain.
53
61
While there may be a response missing or a response not being converted to an object, please check [WalmartResponse](./wiopy/WalmartResponse.py) to get an idea of what a response will return. Some properties are not always present in a response.
Catalog Product API allows a developer to retrieve the products catalog in a paginated fashion. Catalog can be filtered by category, brand and/or any special offers like rollback, clearance etc.
68
+
60
69
```py
61
70
data = walmart_io.catalog_product(category='3944', maxId='8342714')
62
71
```
63
-
A catalog response contains category, format, nextPage, totalPages, and a list of items
64
72
73
+
A catalog response contains category, format, nextPage, totalPages, and a list of items
`bulk_product_lookup` is similar to `product_lookup` however, the bulk version does not raise errors and it is a generator.
90
106
Items are passed in as chunks of max size 20. If an error occurs on that call, the same call will be retried based on the given amount. If error still occurs, all items will be lost. But the entire call will not be lost.
107
+
91
108
```py
92
109
data = walmart_io.bulk_product_lookup('33093101, 54518466, 516833054', amount=1, retries=3)
93
110
for items in data:
94
111
for item in items:
95
112
print(item)
96
113
```
114
+
97
115
Response gives generator of [WalmartProducts](https://walmart.io/docs/affiliate/item_response_groups)
98
116
If you are unfamiliar with async generators; to properly call the async version:
117
+
99
118
```py
100
119
data = async_walmart_io.bulk_product_lookup('33093101, 54518466, 516833054')
Search API allows text search on the Walmart.com catalogue and returns matching items available for sale online.
147
+
124
148
```py
125
149
# Search for tv within electronics and sort by increasing price:
126
150
data = walmart_io.search('tv', categoryId='3944', sort='price', order='ascending')
127
151
```
152
+
128
153
You can also add facets to your search
154
+
129
155
```py
130
156
data = walmart_io.search('tv', filter='brand:Samsung')
131
157
```
132
-
The search response gives back a list of products and some meta data. It returns a `facets` element but there is no detail on the API about what it could return. It is a list of some unknown type
133
158
159
+
The search response gives back a list of products and some meta data. It returns a `facets` element but there is no detail on the API about what it could return. It is a list of some unknown type
0 commit comments