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
-`countryCode` - optional(`String`) - sets the GLOBAL-ID parameter which specifies the eBay site to use for searches. [Possible IDs](https://developer.ebay.com/DevZone/merchandising/docs/Concepts/SiteIDToGlobalID.html)
77
-
78
-
## Example
79
-
80
-
### GetAccessToken
81
-
82
-
```javascript
83
-
constEbay=require('ebay-node-api');
84
-
85
-
let ebay =newEbay({
86
-
clientID:'--Client Id----',
87
-
clientSecret:'-- Client Secret --',
88
-
body: {
89
-
grant_type:'client_credentials',
90
-
//you may need to define the oauth scope
91
-
scope:'https://api.ebay.com/oauth/api_scope'
92
-
}
93
-
});
94
-
ebay.getAccessToken().then((data) => {
95
-
console.log(data); // data.access_token
96
-
}, (error) => {
97
-
console.log(error);
98
-
});
99
-
```
100
-
101
-
### Finding Api
102
-
```javascript
103
-
//This call searches for items on eBay using specific eBay category ID numbers
104
-
ebay.findItemsByCategory(10181).then((data) => {
105
-
console.log(data);
106
-
}, (error) => {
107
-
console.log(error);
108
-
});
109
-
110
-
//This call searches for items on eBay by a keyword query (keywords).
// This call searches for items whose listings are completed and are no longer available for sale by category (using categoryId), by keywords (using keywords), or a combination of the two.
// To check the format of Data, Go to this url (https://jsonblob.com/56cbea67-30b8-11e8-953c-5d1886dcf4a0)
206
-
console.log(data)
207
-
}, (error) => {
208
-
console.log(error);
209
-
});
210
-
});
211
-
```
212
-
213
-
### SearchItemsByKeyword
214
-
```javascript
215
-
ebay.getAccessToken()
216
-
.then((data) => {
217
-
ebay.searchItems({
218
-
keyword:'drone',
219
-
limit:'3'
220
-
}).then((data) => {
221
-
console.log(data);
222
-
// Data is in format of JSON
223
-
// 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)
224
-
})
225
-
});
226
-
```
227
-
228
-
### SearchItemsByFreeShipping
229
-
```javascript
230
-
ebay.getAccessToken()
231
-
.then((data) => {
232
-
ebay.searchItems({
233
-
keyword:'drone',
234
-
limit:3,
235
-
// filter: { maxDeliveryCost: 0 } old object based filter method
236
-
filter:'maxDeliveryCost:0'// new string based filter method. Format here: https://developer.ebay.com/api-docs/buy/static/ref-buy-browse-filters.html#conditionIds
237
-
}).then((data) => {
238
-
console.log(data);
239
-
// Data is in format of JSON
240
-
// 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.
241
-
})
242
-
});
243
-
```
244
-
245
-
### SearchItemsByFilter
246
-
```javascript
247
-
248
-
ebay.getAccessToken()
249
-
.then((data) => {
250
-
ebay.searchItems({
251
-
keyword:'iphone',
252
-
limit:3,
253
-
// filter: { price: '[300..800]', priceCurrency: 'USD', conditions: 'NEW' } old object based filter method
254
-
filter:'price:[300..800],priceCurrency:USD,conditions{NEW}'// new string based filter method. Format here: https://developer.ebay.com/api-docs/buy/static/ref-buy-browse-filters.html#conditionIds
255
-
}).then((data) => {
256
-
console.log(data);
257
-
// Data is in format of JSON
258
-
// 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.
Check out the [Starter Guide](https://pajaydev.github.io/ebay-node-api) documentation with examples to get started.
354
47
355
48
## Test
356
49
All test files are present inside test folder. You can run using
@@ -359,7 +52,7 @@ All test files are present inside test folder. You can run using
359
52
npm run test
360
53
```
361
54
## Issues:
362
-
If you are facing any issues, you can create the issues [here](https://github.com/pajaydev/ebay-node-api/issues).
55
+
If you are facing any issues or missing something, you can create the issues [here](https://github.com/pajaydev/ebay-node-api/issues).
363
56
364
57
## 👍 Contribution:
365
58
Show your ❤️ and support by giving a ⭐. Willing to share your idea or ready to contribute, check [here](https://github.com/pajaydev/ebay-node-api/blob/master/CONTRIBUTING.md)
@@ -368,5 +61,5 @@ Show your ❤️ and support by giving a ⭐. Willing to share your idea or read
0 commit comments