bingstats / ebay-sdk-php
PHP版的eBay SDK。基于benmorel/ebay-sdk-php,支持PHP 8。
dev-master
2023-06-16 07:28 UTC
Requires
- php-64bit: ^7.2 || ^8.0
- ext-curl: *
- ext-libxml: *
Requires (Dev)
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-16 10:15:47 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最初开发的个人项目,他决定创建这个项目来弥补官方PHP SDK的不足。该项目在任何意义上都未经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。