@@ -18,6 +18,7 @@ The intent is to simplify the request process by handling the tedious logic. It'
18
18
* [ Usage] ( #usage )
19
19
* [ Examples] ( #examples )
20
20
* [ Getting Access Token] ( #getaccesstoken )
21
+ * [ Finding Api(findItemsByKeywords, findItemsByCategory, findCompletedItems, getVersion)] ( #finding-api )
21
22
* [ Fetch Items By Keyword] ( #fetchitemsbykeyword )
22
23
* [ Get Items By Category] ( #getitemsbycategory )
23
24
* [ Get Single Item] ( #getitem )
@@ -71,7 +72,7 @@ If you using Sandbox environment, make sure to provide `env` variable in options
71
72
72
73
## Example
73
74
74
- ## GetAccessToken
75
+ ### GetAccessToken
75
76
76
77
``` javascript
77
78
const Ebay = require (' ebay-node-api' );
@@ -92,35 +93,44 @@ ebay.getAccessToken().then((data) => {
92
93
});
93
94
```
94
95
95
- ## FetchItemsByKeyword
96
+ ### Finding Api
96
97
``` javascript
97
- const Ebay = require ( ' ebay-node-api ' );
98
-
99
- let ebay = new Ebay ({
100
- clientID : ' -- Client APP ID ---- ' ,
101
- limit : 6
98
+ // This call searches for items on eBay using specific eBay category ID numbers
99
+ ebay . findItemsByCategory ( 10181 ). then (( data ) => {
100
+ console . log (data);
101
+ }, ( error ) => {
102
+ console . log (error);
102
103
});
104
+
105
+ // This call searches for items on eBay by a keyword query (keywords).
103
106
ebay .findItemsByKeywords (' iphone' ).then ((data ) => {
104
- console .log (data); // fetches top 6 results in form of JSON.
107
+ console .log (data);
105
108
}, (error ) => {
106
109
console .log (error);
107
110
});
108
- ```
109
111
110
- ## GetItemsByCategory
111
- ``` javascript
112
- let ebay = new Ebay ({
113
- clientID: ' -- Client APP ID ----' ,
114
- limit: 6
115
- });
116
- ebay .findItemsByCategory (10181 ).then ((data ) => {
112
+ // 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.
113
+ ebay .findCompletedItems ({
114
+ keywords: ' Garmin nuvi 1300 Automotive GPS Receiver' ,
115
+ categoryId: ' 156955' ,
116
+ sortOrder: ' PricePlusShippingLowest' , // https://developer.ebay.com/devzone/finding/callref/extra/fndcmpltditms.rqst.srtordr.html
117
+ Condition: 3000 ,
118
+ SoldItemsOnly: true ,
119
+ entriesPerPage: 2
120
+ }).then ((data ) => {
117
121
console .log (data);
118
122
}, (error ) => {
119
123
console .log (error);
120
124
});
121
- ```
122
125
123
- ## GetItem
126
+ ebay .getVersion ().then ((data ) => {
127
+ console .log (data .version );
128
+ }, (error ) => {
129
+ console .log (error);
130
+ });
131
+
132
+ ```
133
+ ### GetItem
124
134
``` javascript
125
135
// Get access token and pass it to this method
126
136
ebay .getAccessToken ()
@@ -133,7 +143,7 @@ ebay.getAccessToken()
133
143
});
134
144
```
135
145
136
- ## GetItemByLegacyId
146
+ ### GetItemByLegacyId
137
147
``` javascript
138
148
ebay .getAccessToken ()
139
149
.then ((data ) => {
@@ -149,7 +159,7 @@ ebay.getAccessToken()
149
159
```
150
160
151
161
152
- ## GetItemsByGroupId
162
+ ### GetItemsByGroupId
153
163
``` javascript
154
164
ebay .getAccessToken ()
155
165
.then ((data ) => {
@@ -163,7 +173,7 @@ ebay.getAccessToken()
163
173
});
164
174
```
165
175
166
- ## SearchItemsByKeyword
176
+ ### SearchItemsByKeyword
167
177
``` javascript
168
178
ebay .getAccessToken ()
169
179
.then ((data ) => {
@@ -178,7 +188,7 @@ ebay.getAccessToken()
178
188
});
179
189
```
180
190
181
- ## SearchItemsByFreeShipping
191
+ ### SearchItemsByFreeShipping
182
192
``` javascript
183
193
ebay .getAccessToken ()
184
194
.then ((data ) => {
@@ -195,7 +205,7 @@ ebay.getAccessToken()
195
205
});
196
206
```
197
207
198
- ## SearchItemsByFilter
208
+ ### SearchItemsByFilter
199
209
``` javascript
200
210
201
211
ebay .getAccessToken ()
@@ -213,7 +223,7 @@ ebay.getAccessToken()
213
223
});
214
224
```
215
225
216
- ## MerchandisingApi
226
+ ### MerchandisingApi
217
227
``` javascript
218
228
219
229
ebay .getMostWatchedItems ({
@@ -238,7 +248,7 @@ ebay.getSimilarItems({
238
248
// JSON format of similar items.
239
249
});
240
250
```
241
- ## TaxonomyApi
251
+ ### TaxonomyApi
242
252
243
253
``` javascript
244
254
ebay .getAccessToken ()
@@ -269,7 +279,7 @@ ebay.getAccessToken()
269
279
});
270
280
});
271
281
```
272
- ## ShoppingApi
282
+ ### ShoppingApi
273
283
``` javascript
274
284
275
285
ebay .getAllCategories (' 1234' ).then ((data ) => {
0 commit comments