Example #1
0
 def submitfeed(self, auth_info, data, feed_type):
     region = auth_info['ShopName'].split('/')[0].split('-')[-1]
     submitfeed = Feeds(auth_info['AWSAccessKeyId'], auth_info['SecretKey'], auth_info['SellerId'], region=region)
     marketplaceids = [auth_info['MarketplaceId']]
     try:
         submitfeed_rsp = submitfeed.submit_feed(data, feed_type, marketplaceids=marketplaceids)
     except Exception as e:
         print e
         logger.error('traceback.format_exc():\n%s' % traceback.format_exc())
         logger.debug('we will submit feed again after 30 seconds')
         time.sleep(30)
         submitfeed_rsp = submitfeed.submit_feed(data, feed_type, marketplaceids=marketplaceids)
     submitfeed_rsp_dict = submitfeed_rsp.parsed
     return submitfeed_rsp_dict
Example #2
0
 def submitfeed(self, auth_info, data, feed_type):
     region = auth_info['ShopName'].split('/')[0].split('-')[-1]
     submitfeed = Feeds(auth_info['AWSAccessKeyId'], auth_info['SecretKey'], auth_info['SellerId'], region=region)
     marketplaceids = [auth_info['MarketplaceId']]
     submitfeed_rsp = submitfeed.submit_feed(data, feed_type, marketplaceids=marketplaceids)
     submitfeed_rsp_dict = submitfeed_rsp.parsed
     return submitfeed_rsp_dict
Example #3
0
 def submit_feed(auth_info, data, feed_type):
     submit_feed_public = Feeds(auth_info['AWSAccessKeyId'], auth_info['SecretKey'], auth_info['SellerId'], auth_info['ShopSite'])
     market_place_ids = [auth_info['MarketplaceId']]
     submit_feed_rsp = submit_feed_public.submit_feed(data, feed_type, marketplaceids=market_place_ids)
     submit_feed_rsp_dict = submit_feed_rsp.parsed
     print submit_feed_rsp_dict
     logging.debug('submit_feed_rsp_dict: %s' % str(submit_feed_rsp_dict))
     return submit_feed_rsp_dict