Skip to content

Commit c88c333

Browse files
authored
updated the read me
1 parent dd4d36c commit c88c333

File tree

1 file changed

+52
-4
lines changed

1 file changed

+52
-4
lines changed

README.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ The intent is to simplify the request process by handling the tedious logic. It'
2424
* [Get Single Item](#getitem)
2525
* [Get Item By Legacy Id](#getitembylegacyid)
2626
* [Get Items By Group Id](#getitemsbygroupid)
27+
* [Search Items by Keyword](#searchitemsbykeyword)
28+
* [Search Items with Free Shipping](#searchitemsbyfreeshipping)
29+
* [Search Items Based on Price and Condition](#searchitemsbyfilter)
2730
* [Test](#test)
2831
* [Issues](#issues)
2932
* [LICENSE](#license)
@@ -64,7 +67,7 @@ Register your app here https://go.developer.ebay.com/quick-start-guide.
6467
## GetAccessToken
6568

6669
```javascript
67-
const Ebay = require('../src/index');
70+
const Ebay = require("ebay-node-api");
6871

6972
let ebay = new Ebay({
7073
clientID: "--Client Id----",
@@ -97,7 +100,7 @@ ebay.findItemsByKeywords("iphone").then((data) => {
97100

98101
## GetAllCategories
99102
```javascript
100-
const Ebay = require('../src/index');
103+
const Ebay = require("ebay-node-api");
101104

102105
let ebay = new Ebay({
103106
clientID: "-- Client App id ----",
@@ -112,8 +115,6 @@ ebay.getAllCategories().then((data) => {
112115
```
113116
## GetItemsByCategory
114117
```javascript
115-
const Ebay = require('../src/index');
116-
117118
let ebay = new Ebay({
118119
clientID: "-- Client APP ID ----",
119120
limit: 6
@@ -168,6 +169,53 @@ ebay.getAccessToken()
168169
});
169170
```
170171

172+
## SearchItemsByKeyword
173+
```javascript
174+
ebay.getAccessToken()
175+
.then((data) => {
176+
ebay.searchItems({
177+
keyword: "drone",
178+
limit: "3"
179+
}).then((data) => {
180+
console.log(data);
181+
// Data is in format of JSON
182+
// To check the format of Data, Go to this url (https://developer.ebay.com/api- docs/buy/browse/resources/item_summary/methods/search#w4-w1-w4-SearchforItemsbyKeyword-0)
183+
})
184+
});
185+
```
186+
187+
## SearchItemsByFreeShipping
188+
```javascript
189+
ebay.getAccessToken()
190+
.then((data) => {
191+
ebay.searchItems({
192+
keyword: "drone",
193+
limit: 3,
194+
filter: { maxDeliveryCost: 0 }
195+
}).then((data) => {
196+
console.log(data);
197+
// Data is in format of JSON
198+
// To check the format of Data, Go to this url https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search#w4-w1-w4-ReturnItemswithFreeShipping-6.
199+
})
200+
});
201+
```
202+
203+
## SearchItemsByFilter
204+
```javascript
205+
ebay.getAccessToken()
206+
.then((data) => {
207+
ebay.searchItems({
208+
keyword: "iphone",
209+
limit: 3,
210+
filter: { price: "[300..800]", priceCurrency: "USD", conditions: "NEW" }
211+
}).then((data) => {
212+
console.log(data);
213+
// Data is in format of JSON
214+
// To check the format of Data, Go to this url https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search#w4-w1-w4-ReturnItemsBasedonPriceandCondition-7.
215+
})
216+
});
217+
```
218+
171219
## Test
172220
All test files are present inside test folder. You can run using
173221

0 commit comments

Comments
 (0)