This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"href": "https://api.ebay.com/buy/browse/v1/item_summary/search?q=0696580589792&limit=50&filter=conditionIds%3A%7B1000%7D%2CbuyingOptions%3A%7BFIXED_PRICE%7D%2CitemLocationCountry%3AGB%2CdeliveryCountry%3AGB%2CsellerAccountTypes%3A%7BBUSINESS%7D%2CmaxDeliveryCost%3A0&offset=0", | |
"total": 35, | |
"limit": 50, | |
"offset": 0, | |
"itemSummaries": [ | |
{ | |
"itemId": "v1|166031549255|0", | |
"title": "Korg - EXP2 Foot Controller for MIDI Keyboard", | |
"leafCategoryIds": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error": false, | |
"status": 200, | |
"response": { | |
"href": "https://api.ebay.com/buy/browse/v1/item_summary/search?q=6943478034204&limit=50&filter=conditionIds%3A%7B1000%7D%2CbuyingOptions%3A%7BFIXED_PRICE%7D%2CitemLocationCountry%3AGB%2CdeliveryCountry%3AGB%2CsellerAccountTypes%3A%7BBUSINESS%7D&offset=0", | |
"total": 3, | |
"limit": 50, | |
"offset": 0, | |
"itemSummaries": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run(d, meta_keys_list: list, alternative_filter_keys: list = None): | |
db_connector.connect() | |
try: | |
# Build filter conditions based on provided keys | |
conditions = False | |
if alternative_filter_keys: | |
conditions = [getattr(Product, key) == d[key] for key in alternative_filter_keys if key in d] | |
if conditions: | |
product_row = db_connector.session.query(Product).filter(and_(*conditions)).first() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
products_query = db_connector.session.query( | |
DataFeedEbay.legacyitemid, | |
DataFeedEbay.categoryid.label('categoryid'), | |
DataFeedEbay.id.label('datafeed_id'), | |
Product.id.label('product_id'), | |
Product.description, | |
Product.in_stock_status, | |
Product.product_slug_new | |
).join( | |
Product, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"itemId": "v1|325681931382|0", | |
"title": "Greak: Memories of Azur Sony PlayStation 5 PS5 Platform Game NEW & SEALED", | |
"leafCategoryIds": [ | |
"139973" | |
], | |
"categories": [ | |
{ | |
"categoryId": "139973", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"itemId":"v1|314932142361|0", | |
"title":"PS5 - Rustler - PlayStation 5 Brand New Sealed", | |
"leafCategoryIds":[ | |
"139973" | |
], | |
"categories":[ | |
{ | |
"categoryId":"139973", | |
"categoryName":"Video Games" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error": false, | |
"isGroup": false, | |
"response": { | |
"additionalImages": [ | |
{ | |
"height": 1200, | |
"imageUrl": "https://i.ebayimg.com/images/g/uOcAAOSwMEZmItGk/s-l1600.jpg", | |
"width": 1600 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"details": { | |
"pack_quantity": "1", | |
"design": "Railroad tie", | |
"product_length": "600mm", | |
"product_thickness": "15mm", | |
"product_width": "250mm", | |
"product_shape": "Rectangular", | |
"surface_finish": "Textured" |