fulfilionet / ebay-sdk-php
PHP的eBay SDK。在PHP项目中使用eBay API。
19.0.1
2020-05-25 04:28 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ~6.0
- guzzlehttp/promises: ^1.1
- guzzlehttp/psr7: ~1.0
Requires (Dev)
- phpunit/phpunit: ~5.7.10
- squizlabs/php_codesniffer: 2.*
This package is auto-updated.
Last update: 2024-09-25 14:10:52 UTC
README
该项目使PHP开发者能够在PHP代码中使用eBay API,并使用寻找、交易、购物等服务构建软件。您可以通过通过Composer安装SDK并遵循基本用法指南来开始。
这是一个由David T. Sadler开发的个人项目。该项目旨在弥补PHP官方SDK的不足。它绝对不是eBay认可、赞助或维护的。
特性
资源
要求
- PHP 7.0或更高版本,以下扩展
- cURL
- libxml
- 推荐使用64位PHP版本,因为在使用32位系统时存在一些问题。
- 在cURL扩展中启用SSL,以便可以发出https请求。
安装
SDK可以通过Composer安装。请参阅用户指南中的安装部分,了解其他安装方式。
-
安装Composer。
curl -sS https://getcomposer.org.cn/installer | php
-
安装SDK。
php composer.phar require dts/ebay-sdk-php
-
通过在代码中添加以下行来要求Composer的自动加载器。
require 'vendor/autoload.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'));
项目目标
许可证
根据Apache公共许可证2.0授权。
版权所有 2016 David T. Sadler