Skip to content

Commit

Permalink
updated browse api in read me
Browse files Browse the repository at this point in the history
  • Loading branch information
pajaydev authored Apr 15, 2018
1 parent ab5a612 commit 7933302
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ The intent is to simplify the request process by handling the tedious logic. It'
* [Fetch Items By Keyword](#fetchitemsbykeyword)
* [Get All Categories](#getallcategories)
* [Get Items By Category](#getitemsbycategory)
* [Get Single Item](#getitem)
* [Get Item By Legacy Id](#getitembylegacyid)
* [Get Items By Group Id](#getitemsbygroupid)
* [Test](#test)
* [Issues](#issues)
* [LICENSE](#license)
Expand Down Expand Up @@ -122,6 +125,49 @@ ebay.findItemsByCategory(10181).then((data) => {
});
```

## GetItem
```javascript
// Get access token and pass it to this method
ebay.getAccessToken()
.then((data) => {
ebay.getItem('v1|202117468662|0').then((data) => {
console.log(data);
// Data is in format of JSON
// To check the format of Data, Go to this url (https://jsonblob.com/56cbea67-30b8-11e8-953c-5d1886dcf4a0)
})
});
```

## GetItemByLegacyId
```javascript
ebay.getAccessToken()
.then((data) => {
ebay.getItemByLegacyId({
"legacyItemId": 2628001 // Get Item Details Using a Legacy ID
"legacyVariationSku": "V-00031-WHM" // default null
}).then((data) => {
if (!data) console.log(data);
// Data is in format of JSON
// To check the format of Data, Go to this url (https://jsonblob.com/56cbea67-30b8-11e8-953c-5d1886dcf4a0)
});
});
```


## GetItemsByGroupId
```javascript
ebay.getAccessToken()
.then((data) => {
ebay.getItemByItemGroup("151915076499").then((data) => {
// Data is in format of JSON
// To check the format of Data, Go to this url (https://jsonblob.com/56cbea67-30b8-11e8-953c-5d1886dcf4a0)
console.log(data)
}, (error) => {
console.log(error);
});
});
```

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

Expand Down

0 comments on commit 7933302

Please sign in to comment.