pajaydev / ebay-node-api

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

Can I Search By Keyword and Category? #58

Closed pythoncreate closed 4 years ago

pythoncreate commented 5 years ago

Sorry if this is a dumb question, but I'm having a hard time figuring out how to query the API on both keyword and category ID. I see that ability in find advanced in ebay api, but i don't see that ability here. Am I wrong? Thanks

pajaydev commented 5 years ago

@pythoncreate Let me check

pajaydev commented 5 years ago

@pythoncreate you can use something like this

ebay.getAccessToken()
    .then((data) => {
        ebay.searchItems({
            keyword: 'phone',
            categoryId: 220
        }).then((data) => {
            console.log(data);
            // Data is in format of JSON
            // To check the format of Data, Go to this url (https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search#w4-w1-w4-SearchforItemsbyKeyword-0)
        })
    });
pajaydev commented 4 years ago

@pythoncreate Closing this issue. Kindly create new one if the solution not working.

wittyapps commented 4 years ago

can we get this to work with "findItemsByKeywords" method as well?