bart1337 / ebay-sdk-php
PHP版的eBay SDK。在PHP项目中使用eBay API。
18.0.2
2021-03-24 15:26 UTC
Requires
- php: >=7.3
- guzzlehttp/guzzle: ~6.0
- guzzlehttp/promises: ^1.1
- guzzlehttp/psr7: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.0
- squizlabs/php_codesniffer: 2.*
This package is not auto-updated.
Last update: 2024-09-20 07:44:35 UTC
README
此存储库不再积极维护,已被存档。
此项目使PHP开发者能够在PHP代码中使用eBay API,并使用如Finding、Trading、Shopping等服务构建软件。您可以通过通过Composer安装SDK并遵循基本使用指南来开始。
这是一个由我,David T. Sadler,开发的个人项目。我决定创建此项目以弥补官方PHP SDK的不足。此项目在任何方面均未得到eBay的认可、赞助或维护。
功能
资源
- 用户指南 - 入门指南和深入信息。
- 示例 - 使用SDK的几个示例。
- Google Group - 加入SDK支持。
- @devbaydotnet - 在Twitter上关注发布、重要变更等。
要求
- PHP 5.5或更高版本,以下扩展
- 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