Skip to content

Commit

Permalink
update readme and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
pajaydev committed Aug 18, 2019
1 parent 2ed96c3 commit b98fd1c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 28 deletions.
62 changes: 36 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The intent is to simplify the request process by handling the tedious logic. It'
* [Usage](#usage)
* [Examples](#examples)
* [Getting Access Token](#getaccesstoken)
* [Finding Api(findItemsByKeywords, findItemsByCategory, findCompletedItems, getVersion)](#finding-api)
* [Fetch Items By Keyword](#fetchitemsbykeyword)
* [Get Items By Category](#getitemsbycategory)
* [Get Single Item](#getitem)
Expand Down Expand Up @@ -71,7 +72,7 @@ If you using Sandbox environment, make sure to provide `env` variable in options

## Example

## GetAccessToken
### GetAccessToken

```javascript
const Ebay = require('ebay-node-api');
Expand All @@ -92,35 +93,44 @@ ebay.getAccessToken().then((data) => {
});
```

## FetchItemsByKeyword
### Finding Api
```javascript
const Ebay = require('ebay-node-api');

let ebay = new Ebay({
clientID: '-- Client APP ID ----',
limit: 6
//This call searches for items on eBay using specific eBay category ID numbers
ebay.findItemsByCategory(10181).then((data) => {
console.log(data);
}, (error) => {
console.log(error);
});

//This call searches for items on eBay by a keyword query (keywords).
ebay.findItemsByKeywords('iphone').then((data) => {
console.log(data); // fetches top 6 results in form of JSON.
console.log(data);
}, (error) => {
console.log(error);
});
```

## GetItemsByCategory
```javascript
let ebay = new Ebay({
clientID: '-- Client APP ID ----',
limit: 6
});
ebay.findItemsByCategory(10181).then((data) => {
// This call searches for items whose listings are completed and are no longer available for sale by category (using categoryId), by keywords (using keywords), or a combination of the two.
ebay.findCompletedItems({
keywords: 'Garmin nuvi 1300 Automotive GPS Receiver',
categoryId: '156955',
sortOrder: 'PricePlusShippingLowest', //https://developer.ebay.com/devzone/finding/callref/extra/fndcmpltditms.rqst.srtordr.html
Condition: 3000,
SoldItemsOnly: true,
entriesPerPage: 2
}).then((data) => {
console.log(data);
}, (error) => {
console.log(error);
});
```

## GetItem
ebay.getVersion().then((data) => {
console.log(data.version);
}, (error) => {
console.log(error);
});

```
### GetItem
```javascript
// Get access token and pass it to this method
ebay.getAccessToken()
Expand All @@ -133,7 +143,7 @@ ebay.getAccessToken()
});
```

## GetItemByLegacyId
### GetItemByLegacyId
```javascript
ebay.getAccessToken()
.then((data) => {
Expand All @@ -149,7 +159,7 @@ ebay.getAccessToken()
```


## GetItemsByGroupId
### GetItemsByGroupId
```javascript
ebay.getAccessToken()
.then((data) => {
Expand All @@ -163,7 +173,7 @@ ebay.getAccessToken()
});
```

## SearchItemsByKeyword
### SearchItemsByKeyword
```javascript
ebay.getAccessToken()
.then((data) => {
Expand All @@ -178,7 +188,7 @@ ebay.getAccessToken()
});
```

## SearchItemsByFreeShipping
### SearchItemsByFreeShipping
```javascript
ebay.getAccessToken()
.then((data) => {
Expand All @@ -195,7 +205,7 @@ ebay.getAccessToken()
});
```

## SearchItemsByFilter
### SearchItemsByFilter
```javascript

ebay.getAccessToken()
Expand All @@ -213,7 +223,7 @@ ebay.getAccessToken()
});
```

## MerchandisingApi
### MerchandisingApi
```javascript

ebay.getMostWatchedItems({
Expand All @@ -238,7 +248,7 @@ ebay.getSimilarItems({
// JSON format of similar items.
});
```
## TaxonomyApi
### TaxonomyApi

```javascript
ebay.getAccessToken()
Expand Down Expand Up @@ -269,7 +279,7 @@ ebay.getAccessToken()
});
});
```
## ShoppingApi
### ShoppingApi
```javascript

ebay.getAllCategories('1234').then((data) => {
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ebay-node-api",
"version": "2.5.7",
"version": "2.6.0",
"description": "Ebay node api client",
"main": "./src/index.js",
"homepage": "https://github.com/pajaydev/ebay-node-api",
Expand All @@ -16,7 +16,9 @@
"Searching",
"products",
"Browse",
"Category"
"Category",
"FindingApi",
"node-api"
],
"license": "MIT",
"repository": {
Expand Down

0 comments on commit b98fd1c

Please sign in to comment.