shrestharikesh / ebay-sdk-php
PHP的eBay SDK。基于dts/ebay-sdk-php的分支,支持PHP 8。
v1.0.0
2024-07-05 03:49 UTC
Requires
- php-64bit: ^7.2 || ^8.0
- ext-curl: *
- ext-libxml: *
- guzzlehttp/guzzle: ^6.0 || ^7.0
- guzzlehttp/promises: ^1.1
- guzzlehttp/psr7: ^2.6
Requires (Dev)
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-05 04:10:06 UTC
README
这是由David T. Sadler创建的原始项目dts/ebay-sdk-php的分支,支持PHP 7.3、PHP 7.4和PHP 8,并且与Guzzle 7兼容。
原始项目已于2020年2月正式停止维护。
我计划在短期内维护这个分支。 目标不是使其与最新的eBay API版本保持同步,而是为现有应用程序升级到PHP 8提供一个解决方案。新用户应寻找更好的PHP SDK。
此项目使PHP开发者能够在PHP代码中使用eBay API,并使用如Finding、Trading、Shopping等服务构建软件。
这是一个由David T. Sadler最初开发的个人项目,他决定创建此项目来弥补官方SDK对于PHP的缺失。这个项目在任何方面都不是eBay的支持、赞助或维护。
功能
要求
- PHP 7.2+或PHP 8.0+,以下扩展
- curl
- libxml
- 64位版本
- 在cURL扩展中启用SSL,以便进行https请求。
安装
SDK可以使用Composer安装
composer require benmorel/ebay-sdk-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') );
更多示例可以在ebay-sdk-examples仓库中找到。
许可
根据Apache Public License 2.0许可。
版权所有 2016 David T. Sadler。