pajaydev / ebay-node-api

eBay API Client for node
https://pajaydev.github.io/ebay-node-api
MIT License
131 stars 76 forks source link

search by ePID with Auth flow #140

Closed rambonette closed 3 years ago

rambonette commented 3 years ago

Goal of the pull request:

Description

added the ability so search by epid in function 'searchItems'. It was stated in the repo's docs but there was no real way to do it using the auth flow.

marked both bugfix and enhancement because it's not a proper bug, but it's not an enhancement either since it was stated in the docs that 'searchItems' could search by ePID.

Details: just two lines in 'src/buy-api.js'

if (!searchConfig.keyword && !searchConfig.categoryId && !searchConfig.gtin && !searchConfig.epid) throw new Error('Error --> Keyword or category id is required in query param');

queryParam = queryParam + (searchConfig.epid ? '&epid=' + searchConfig.epid : '');