Skip to content

Commit 2b74188

Browse files
committed
updated readme
1 parent 37ab97d commit 2b74188

File tree

1 file changed

+35
-16
lines changed

1 file changed

+35
-16
lines changed

README.md

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ The intent is to simplify the request process by handling the tedious logic. It'
1919
* [Examples](#examples)
2020
* [Getting Access Token](#getaccesstoken)
2121
* [Fetch Items By Keyword](#fetchitemsbykeyword)
22-
* [Get All Categories](#getallcategories)
2322
* [Get Items By Category](#getitemsbycategory)
2423
* [Get Single Item](#getitem)
2524
* [Get Item By Legacy Id](#getitembylegacyid)
@@ -106,21 +105,6 @@ ebay.findItemsByKeywords("iphone").then((data) => {
106105
});
107106
```
108107

109-
## GetAllCategories
110-
```javascript
111-
const Ebay = require("ebay-node-api");
112-
113-
let ebay = new Ebay({
114-
clientID: "-- Client App id ----",
115-
details: "childCategories" //optional parameter
116-
});
117-
118-
ebay.getAllCategories().then((data) => {
119-
console.log(data); //extract data.CategoryArray
120-
}, (error) => {
121-
console.log(error);
122-
})
123-
```
124108
## GetItemsByCategory
125109
```javascript
126110
let ebay = new Ebay({
@@ -283,6 +267,41 @@ ebay.getAccessToken()
283267
});
284268
});
285269
```
270+
## ShoppingApi
271+
```javascript
272+
273+
ebay.getAllCategories('1234').then((data) => {
274+
console.log(data); //extract data.CategoryArray
275+
}, (error) => {
276+
console.log(error);
277+
});
278+
279+
// Get User Profile
280+
//https://developer.ebay.com/devzone/shopping/docs/callref/GetUserProfile.html
281+
ebay.getUserDetails({ userId: "ajaykumapratha_0", details: true }).then((data) => {
282+
console.log(data);
283+
}, (error) => {
284+
console.log(error);
285+
});
286+
287+
// Get Item Status
288+
//https://developer.ebay.com/devzone/shopping/docs/callref/GetItemStatus.html
289+
ebay.getItemStatus(["153265274986", "153265274986"]).then((data) => {
290+
console.log(data);
291+
}, (error) => {
292+
console.log(error);
293+
});
294+
295+
//https://developer.ebay.com/devzone/shopping/docs/callref/GetShippingCosts.html
296+
ebay.getShippingCosts({
297+
itemId: "153265274986", destCountryCode: 'US',
298+
destPostalCode: '95128'
299+
}).then((data) => {
300+
console.log(data);
301+
}, (error) => {
302+
console.log(error);
303+
});
304+
```
286305

287306
## Test
288307
All test files are present inside test folder. You can run using

0 commit comments

Comments
 (0)