question

karhir_18 avatar image
0 Likes"
karhir_18 asked

,Finding API Problem

Hi, I'm really new to the ebay API and am trying to filter my search results using itemfilter, however it doesn't seem to have any effect and I can't find any help from the documentation on how to solve this problem in python.


def Finder():

#FindItemsAdvanced

#FindItemsbyCategory

try:

api = Finding(appid="123456789", config_file=None)

request = {

'keywords': "Python",

'itemFilter': [

{'name': 'Condition', 'value': 'Used'},

{'name': 'currency', 'value': 'USD'},

{'name': 'minPrice', 'value': 300.0}

]

}

# response = api.execute('findItemsAdvanced', {'keywords': 'Python'})

response = api.execute('findItemsAdvanced', request)

print(response.dict())

except ConnectionError as e:

print(e)

print(e.response.dict())

,

I'm trying out the ebay API and can't seem to make it filter at all. Any help would be appreciated.


def Finder():

#FindItemsAdvanced

#FindItemsbyCategory

try:

api = Finding(appid="123456789", config_file=None)

request = {

'keywords': "Python",

'itemFilter': [

{'name': 'Condition', 'value': 'Used'},

{'name': 'currency', 'value': 'USD'},

{'name': 'minPrice', 'value': 300.0}

]

}

# response = api.execute('findItemsAdvanced', {'keywords': 'Python'})

response = api.execute('findItemsAdvanced', request)

print(response.dict())

except ConnectionError as e:

print(e)

print(e.response.dict())

finding apifindingapiadvanced search
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
alvisinwales avatar image
0 Likes"
alvisinwales answered

I find these filters difficult to understand. How about trying:

{'name': 'MinPrice', 'value': '300.0', 'paramName': 'Currency', 'paramValue': 'USD'}

instead of the existing two lines.


,

I find these filters difficult to understand. How about trying:

{'name': 'MinPrice', 'value': '300.0', 'paramName': 'Currency', 'paramValue': 'USD'}

instead of the current two lines.


10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.