sapientpro/ebay-traditional-sdk
PHP的Ebay传统API SDK
v1.0.0
2023-05-03 11:46 UTC
Requires
- php-64bit: ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- ext-xml: *
- guzzlehttp/guzzle: ^7.0
- guzzlehttp/promises: ^1.1
- guzzlehttp/psr7: ^1.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- rector/rector: ^0.11
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.6
This package is not auto-updated.
Last update: 2024-09-13 16:14:26 UTC
README
这是对原始 dts/ebay-sdk-php 的分支,由 @davidtsadler 创建,支持PHP 8,并兼容Guzzle 7。
原始项目已于2020年2月正式弃用。
此项目允许PHP开发者在PHP代码中使用传统Ebay API,并使用查找、交易、购物等服务构建软件。
特性
先决条件
- PHP 8或更高版本,以下扩展
- curl
- libxml
- 64位版本,因为在32位系统上使用SDK存在一些问题。
- 在cURL扩展中启用SSL,以便可以发出https请求。
安装
SDK可以通过Composer安装
composer require sapientpro/ebay-traditional-sdk
示例用法
以下为该包的示例用法。请访问wiki获取更详细的文档和示例。
获取官方Ebay时间
<?php use EBay\SDK\Shopping\Services\ShoppingService; use EBay\SDK\Shopping\Types\GetEbayTimeRequestType; // 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'));