macropage-sdk /ebay-trading-upload-images
用于上传图片到eBay EPS (eBay图片服务)的小助手
dev-master
2020-02-11 10:56 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- kint-php/kint: ^3.2
- roave/security-advisories: dev-master
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);
注意:
siteid
需要是数字,如果使用字母可能会出现非常奇怪的SSL错误!
你(应该)得到的结果
state
应该涵盖所有上传的结果,如果其中一个失败,它会显示带有error
键的FALSE
。
你可以使用的更多配置键
- 并发(并行上传的数量)
- 兼容级别(X-EBAY-API-COMPATIBILITY-LEVEL)
- ExtensionInDays (查看eBay文档)
你需要帮助使用Ebay API吗?
雇佣我: info@macropage.de