macropage-sdk/ebay-trading-upload-images

用于上传图片到eBay EPS (eBay图片服务)的小助手

dev-master 2020-02-11 10:56 UTC

This package is auto-updated.

Last update: 2024-08-29 05:06:47 UTC


README

用法

$images[] = file_get_contents('/tmp/img1.png');
$images[] = file_get_contents('/tmp/img2.png');
//$images[] = 'this should not work'; <-- test this so see how things fail

$EbayUploadImages = new upload_images([
										  'app-name'   => 'xxxxxxxx',
										  'cert-name'  => 'xxxxxxxx',
										  'dev-name'   => 'xxxxxxxx',
										  'siteid'     => 77,
										  'auth-token' => 'xxxxxxxx'
									  ]);
$responses        = $EbayUploadImages->upload($images);
d($responses);

#f03c15 注意: siteid需要是数字,如果使用字母可能会出现非常奇怪的SSL错误!

你(应该)得到的结果

state应该涵盖所有上传的结果,如果其中一个失败,它会显示带有error键的FALSE

你可以使用的更多配置键

  • 并发(并行上传的数量)
  • 兼容级别(X-EBAY-API-COMPATIBILITY-LEVEL)
  • ExtensionInDays (查看eBay文档)

你需要帮助使用Ebay API吗?

雇佣我: info@macropage.de

Follow me

Follow me

Follow me