diff --git a/README.md b/README.md index c7e0629..b378bd6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ The intent is to simplify the request process by handling the tedious logic. It' * [Examples](#examples) * [Getting Access Token](#getaccesstoken) * [Fetch Items By Keyword](#fetchitemsbykeyword) - * [Get All Categories](#getallcategories) * [Get Items By Category](#getitemsbycategory) * [Get Single Item](#getitem) * [Get Item By Legacy Id](#getitembylegacyid) @@ -106,21 +105,6 @@ ebay.findItemsByKeywords("iphone").then((data) => { }); ``` -## GetAllCategories -```javascript -const Ebay = require("ebay-node-api"); - -let ebay = new Ebay({ - clientID: "-- Client App id ----", - details: "childCategories" //optional parameter -}); - -ebay.getAllCategories().then((data) => { - console.log(data); //extract data.CategoryArray -}, (error) => { - console.log(error); -}) -``` ## GetItemsByCategory ```javascript let ebay = new Ebay({ @@ -283,6 +267,41 @@ ebay.getAccessToken() }); }); ``` +## ShoppingApi +```javascript + +ebay.getAllCategories('1234').then((data) => { + console.log(data); //extract data.CategoryArray +}, (error) => { + console.log(error); +}); + +// Get User Profile +//https://developer.ebay.com/devzone/shopping/docs/callref/GetUserProfile.html +ebay.getUserDetails({ userId: "ajaykumapratha_0", details: true }).then((data) => { + console.log(data); +}, (error) => { + console.log(error); +}); + +// Get Item Status +//https://developer.ebay.com/devzone/shopping/docs/callref/GetItemStatus.html +ebay.getItemStatus(["153265274986", "153265274986"]).then((data) => { + console.log(data); +}, (error) => { + console.log(error); +}); + +//https://developer.ebay.com/devzone/shopping/docs/callref/GetShippingCosts.html +ebay.getShippingCosts({ + itemId: "153265274986", destCountryCode: 'US', + destPostalCode: '95128' +}).then((data) => { + console.log(data); +}, (error) => { + console.log(error); +}); +``` ## Test All test files are present inside test folder. You can run using