theprashil / ebay-sdk-php
PHP 的 eBay SDK。dts/ebay-sdk-php 的分支,支持 PHP 8。
1.0.0
2024-01-23 07:33 UTC
Requires
- php-64bit: ^7.2 || ^8.0
- ext-curl: *
- ext-libxml: *
- guzzlehttp/guzzle: ^6.0 || ^7.0
- guzzlehttp/promises: ^1.1
- guzzlehttp/psr7: ^1.0
Requires (Dev)
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-23 10:18:33 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 公共许可证 2.0 许可。
版权所有 2016 David T. Sadler。