ebay-api
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -258,3 +258,3 @@ // eBay API client for Node.js | ||
ebayApiGetRequest(options, function(error, items) { | ||
ebayApiGetRequest(thisPageOptions, function(error, items) { | ||
// console.log("Got response from page", thisPageOptions.params['paginationInput.pageNumber']); | ||
@@ -370,3 +370,5 @@ | ||
if (data.searchResult) { | ||
items = _(data.searchResult).first().item || []; // e.g. for FindingService | ||
// reduce in steps so successful but empty responses don't throw error | ||
data = !_.isEmpty(data.searchResult) ? _(data.searchResult).first() : null; | ||
items = (data && data.item) || []; // e.g. for FindingService | ||
} | ||
@@ -373,0 +375,0 @@ else if (data.itemRecommendations.item) { |
{ | ||
"name": "ebay-api", | ||
"description": "eBay API Client", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"homepage": "https://github.com/newleafdigital/nodejs-ebay-api", | ||
@@ -6,0 +6,0 @@ "author": "Ben Buckman <ben@newleafdigital.com> (http://newleafdigital.com)", |
@@ -8,3 +8,11 @@ eBay API client for Node.js | ||
## To use | ||
`npm install ebay-api` | ||
`var ebay = require('ebay-api');` | ||
(See the examples) | ||
## A word on the eBay APIs | ||
@@ -11,0 +19,0 @@ |
23677
393
133