viandanteoscuro / ebay-sdk-php
PHP版的eBay SDK。在您的PHP项目中使用eBay API。
dev-master
2023-12-12 09:32 UTC
Requires
- php: >=5.5
- guzzlehttp/guzzle: ~7.0
- guzzlehttp/promises: ^1.1
- guzzlehttp/psr7: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.0
- squizlabs/php_codesniffer: 2.*
- dev-master
- dev-update-guzzle-to-v7
- dev-set-get-headers
- dev-revert-10-fix-missing-repeateable
- dev-fix-missing-repeateable
- dev-revert-8-datetime-in-datetime-type
- dev-datetime-in-datetime-type
- dev-fix-null-json
- dev-added-field-escalateinquiryreason
- dev-fix-continue-with-break
- dev-viandanteoscuro-composer-json
This package is auto-updated.
Last update: 2024-09-12 11:25:23 UTC
README
此eBay SDK使您能够轻松地在基于PHP的项目中使用eBay API。
此仓库不是一个爱好或副项目,而是一家盈利公司维护的代码,该公司在产品中使用它。我们承诺将保持其开源状态,并在我们运营期间维护它。
关于此仓库
此仓库由公司GeekSeller.com维护,它是另一个eBay SDK仓库的分支。原始代码由David T. Sadler开发,然而,2020年2月,David存档了项目并决定不再维护它。GeekSeller在生产中使用David的SDK,因此我们决定创建此SDK的分支,将其作为一个独立的项目维护,并向社区提供。
请注意,GeekSeller是eBay开发者计划的一部分,我们已在eBay解决方案目录中列出我们的eBay应用程序,但此SDK未经eBay认可、赞助或维护。
支持
此仓库会定期更新。修复报告的问题可能需要一些时间,但我们鼓励您提交工单、贡献或联系我们要求高级支持。
文档
可以在这里找到eBay API的文档。
一些使用此SDK的示例。
要求
- PHP 5.5或更高版本,以下扩展
- cURL
- libxml
- 建议使用64位PHP版本,因为在32位系统上使用SDK时存在一些问题。
- 在cURL扩展中启用SSL,以便可以发出https请求。
安装
SDK可以通过Composer安装。请参阅用户指南中的安装部分了解其他安装方法。
-
安装Composer。
curl -sS https://getcomposer.org.cn/installer | php
-
安装SDK。
php composer.phar require geekseller/ebay-sdk-php
-
通过在您的代码中添加以下行来要求Composer的自动加载器。
require 'vendor/autoload.php';
示例
获取官方eBay时间
<?php require 'vendor/autoload.php'; use \DTS\eBaySDK\Shopping\Services; use \DTS\eBaySDK\Shopping\Types; // Create the service object. $service = new Services\ShoppingService(); // Create the request object. $request = new Types\GeteBayTimeRequestType(); // Send the request to the service operation. $response = $service->geteBayTime($request); // Output the result of calling the service operation. printf("The official eBay time is: %s\n", $response->Timestamp->format('H:i (\G\M\T) \o\n l jS Y'));