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
Copy file name to clipboardExpand all lines: demo/searchApi.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ let ebay = new Ebay({
13
13
});
14
14
15
15
16
-
// //Search for Items by Keyword.
16
+
// // //Search for Items by Keyword.
17
17
ebay.getAccessToken()
18
18
.then((data)=>{
19
19
ebay.searchItems({
@@ -63,7 +63,8 @@ ebay.getAccessToken()
63
63
ebay.searchItems({
64
64
keyword: 'drone',
65
65
limit: 3,
66
-
filter: {maxDeliveryCost: 0}
66
+
filter: {maxDeliveryCost: 0},
67
+
aspect_filter: {categoryId: 179697,conditionDistributions: '{NEW}'}// docs to provide aspect_filter https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search#h2-input
@@ -90,6 +84,12 @@ const findItemsByProduct = function (options) {
90
84
);
91
85
};
92
86
87
+
88
+
/**
89
+
* Constructs query param based on some logic to support filter and aspect_filter params.
90
+
* output will be keywords=iphone&itemFilter(0).name=Condition&itemFilter(0).value=3000&itemFilter(1).name=FreeShippingOnly&itemFilter(1).value=true&itemFilter(2).name=SoldItemsOnly&itemFilter(2).value=true
0 commit comments