如何使用 Bigcommerce 的 Python API 上传图像(从网络)?
到目前为止我已经知道了:
custom = api.Products.create(name='Test', type='physical', price=8.33, categories=[85], availability='available', weight=0)
谢谢!我几乎什么都试过了!
请您参考如下方法:
这将在 BigCommerce 网站上创建产品。通过输入以下行,您可以在创建产品后创建图像。 image_file 标签应该是一个完全限定的 URL,指向 BigCommerce 网站可以访问的图像,可以在另一个网站或您自己的网络服务器上找到。
api.ProductImages.create(parentid=custom.id, image_file='http://www.evenmore.co.uk/images/emgrab_s.jpg', description='我的图片描述')
