Closed EarthlingDavey closed 2 years ago
@pajaydev thanks for merging this in. I appreciate you maintaining this repo! 👊🏼✌🏼
This actually seems to have broken the getSingleItem method as it seems to be expecting a parameter named "input" but the input is actually name "itemId". So the method call always fails.
const getSingleItem = function (itemId) {
if (!input || (typeof input !== 'object' && typeof input !== 'string'))
throw new Error('invalid_request_error -> Invalid input');
// To preserve backwards compatibility
if (typeof input === 'string') {
input = { ItemID: input };
}
...
};
Thanks @SteveMcArthur ... idk how I missed this. Probable tested on local then copy/pasted into the text editor on GitHub, lesson learned & patch PR just submitted.
Update
getSingleItem
to accept object as parameter.Goal of the pull request:
Description
This change allows for additional parameters to be passed to
getSingleItem
. For example in a similar way togetShippingCosts
.It can be used as before with a string of ItemID, backwards compatibility is preserved.
Also, an object may be passed, to add parameters refferenced in the eBay GetSingleItem docs
e.g.