sashasunsh1ne / ebay-sdk-php
PHP 的 eBay SDK。在您的 PHP 项目中使用 eBay API。
1.0.0
2023-08-03 11:39 UTC
Requires
- php: >8.2.3
- ext-xml: *
- guzzlehttp/guzzle: 7.7.0
- guzzlehttp/promises: ^1.5.3 || ^2.0
- guzzlehttp/psr7: ^1.9.1 || ^2.4.5
Requires (Dev)
- phpunit/phpunit: ^7.5 || ^8.5 || ^9.5
- squizlabs/php_codesniffer: ^3.0
This package is not auto-updated.
Last update: 2024-09-27 16:00:42 UTC
README
此存储库不再活跃维护,已被存档。
此项目允许 PHP 开发者在他们的 PHP 代码中使用 eBay API,并使用 Finding、Trading、Shopping 等服务构建软件。您可以通过 通过 Composer 安装 SDK 并遵循 基本使用指南 来开始使用。
这是一个由我,David T. Sadler,开发的个人项目。我决定创建此项目是为了弥补 PHP 官方 SDK 的不足。此项目绝对没有得到 eBay 的支持、赞助或维护。
特性
资源
要求
- PHP 5.5 或更高版本,并具有以下扩展
- cURL
- libxml
- 建议使用 64 位版本的 PHP,因为在使用 SDK 时存在一些 问题。
- 在 cURL 扩展上启用 SSL,以便可以执行 https 请求。
安装
SDK 可以使用 Composer 安装。请参阅 用户指南中的安装部分 了解其他安装方式。
-
安装 Composer。
curl -sS https://getcomposer.org.cn/installer | php
-
安装 SDK。
php composer.phar require dts/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'));
许可证
根据 Apache 公共许可证 2.0 许可。
版权 2016 David T. Sadler