Skip to content

Commit 7933302

Browse files
authored
updated browse api in read me
1 parent ab5a612 commit 7933302

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ The intent is to simplify the request process by handling the tedious logic. It'
2121
* [Fetch Items By Keyword](#fetchitemsbykeyword)
2222
* [Get All Categories](#getallcategories)
2323
* [Get Items By Category](#getitemsbycategory)
24+
* [Get Single Item](#getitem)
25+
* [Get Item By Legacy Id](#getitembylegacyid)
26+
* [Get Items By Group Id](#getitemsbygroupid)
2427
* [Test](#test)
2528
* [Issues](#issues)
2629
* [LICENSE](#license)
@@ -122,6 +125,49 @@ ebay.findItemsByCategory(10181).then((data) => {
122125
});
123126
```
124127

128+
## GetItem
129+
```javascript
130+
// Get access token and pass it to this method
131+
ebay.getAccessToken()
132+
.then((data) => {
133+
ebay.getItem('v1|202117468662|0').then((data) => {
134+
console.log(data);
135+
// Data is in format of JSON
136+
// To check the format of Data, Go to this url (https://jsonblob.com/56cbea67-30b8-11e8-953c-5d1886dcf4a0)
137+
})
138+
});
139+
```
140+
141+
## GetItemByLegacyId
142+
```javascript
143+
ebay.getAccessToken()
144+
.then((data) => {
145+
ebay.getItemByLegacyId({
146+
"legacyItemId": 2628001 // Get Item Details Using a Legacy ID
147+
"legacyVariationSku": "V-00031-WHM" // default null
148+
}).then((data) => {
149+
if (!data) console.log(data);
150+
// Data is in format of JSON
151+
// To check the format of Data, Go to this url (https://jsonblob.com/56cbea67-30b8-11e8-953c-5d1886dcf4a0)
152+
});
153+
});
154+
```
155+
156+
157+
## GetItemsByGroupId
158+
```javascript
159+
ebay.getAccessToken()
160+
.then((data) => {
161+
ebay.getItemByItemGroup("151915076499").then((data) => {
162+
// Data is in format of JSON
163+
// To check the format of Data, Go to this url (https://jsonblob.com/56cbea67-30b8-11e8-953c-5d1886dcf4a0)
164+
console.log(data)
165+
}, (error) => {
166+
console.log(error);
167+
});
168+
});
169+
```
170+
125171
## Test
126172
All test files are present inside test folder. You can run using
127173

0 commit comments

Comments
 (0)