-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_ebay_details.py
24 lines (20 loc) · 962 Bytes
/
get_ebay_details.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class EbayData:
def get_ebay_data(config, keyword):
print "hello"
site_id = config.get('ebay', 'site_id')
app_id = config.get('ebay', 'app_id')
max_price = config.get('ebay', 'max_price')
min_price = config.get('ebay', 'min_price')
sort_order = config.get('ebay', 'sort_order')
api = finding(siteid=site_id,appid=app_id, config_file=None)
response = api.execute('findItemsAdvanced', {
'keywords': keyword,
'itemFilter': [
{'name': 'Condition', 'value': 'Used'},
{'name': 'MinPrice', 'value': min_price, 'paramName': 'Currency', 'paramValue': 'USD'},
{'name': 'MaxPrice', 'value': max_price, 'paramName': 'Currency', 'paramValue': 'USD'}
],
'sortOrder': sort_order
})
item_response = response.dict()
return item_response['itemSearchURL']