gaolujie1989 / ebay-sdk-php
基于benmorel/ebay-sdk-php的分支,一个用于PHP的eBay SDK。基于dts/ebay-sdk-php,支持PHP 8。
19.1.1
2023-08-07 02:30 UTC
Requires
- php-64bit: ^7.2 || ^8.0
- ext-curl: *
- ext-libxml: *
- guzzlehttp/guzzle: ^6.0 || ^7.0
- guzzlehttp/promises: ^1.1|^2.0
- guzzlehttp/psr7: ^1.0|^2.0
Requires (Dev)
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-07 04:48:54 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的缺失。这个项目在任何方面都没有得到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。