diff --git a/README.md b/README.md index 9264d53..bc85c31 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ The intent is to simplify the request process by handling the tedious logic. It' * [Search Items with Free Shipping](#searchitemsbyfreeshipping) * [Search Items Based on Price and Condition](#searchitemsbyfilter) * [Taxonomy Api(getDefaultCategoryTreeId, getCategoryTree, getCategorySubtree, getCategorySuggestions)](#taxonomyapi) + * [Get Most Watched item, Get Most Similar Items](#merchandisingapi) * [Test](#test) * [Issues](#issues) * [Contribution](#contribution) @@ -205,6 +206,7 @@ ebay.getAccessToken() ## SearchItemsByFilter ```javascript + ebay.getAccessToken() .then((data) => { ebay.searchItems({ @@ -219,6 +221,32 @@ ebay.getAccessToken() }) }); ``` + +## MerchandisingApi +```javascript + +ebay.getMostWatchedItems({ + maxResults: 3, // optional + categoryId: 267 // optional +}).then((data) => { + if (data.errorMessage) { + console.log("Error:" + data.errorMessage); + } + console.log(JSON.stringify(data)); +}); + + +ebay.getSimilarItems({ + maxResults: 3, // optional + itemId=280254552262 // optional +}).then((data) => { + if (data.errorMessage) { + console.log("Error:" + data.errorMessage); + } + console.log(JSON.stringify(data)); + // JSON format of similar items. +}); +``` ## TaxonomyApi ```javascript