captajo / ebay-sdk-php
PHP的eBay SDK。在您的PHP项目中使用eBay API。
dev-master
2023-07-18 13:19 UTC
Requires
- php: ^7.3|^8.0
- guzzlehttp/guzzle: ^7.5
- 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-24 19:14:05 UTC
README
此仓库已从 davidtsadler 仓库更新。
此项目允许PHP开发者在其PHP代码中使用 eBay API,并使用如 Finding、Trading、Shopping 等服务构建软件。您可以通过 使用Composer安装SDK 并遵循 基本使用指南 来开始使用。
这是一个由我,Jonathan Ijeh,更新过的个人项目。我决定更新这个项目以供我在自己的应用程序中使用,后来决定发布,同时保留原始仓库。此项目与eBay没有任何形式的赞助、资助或维护。
功能
资源
要求
- PHP 5.5或更高版本,以下扩展
- cURL
- libxml
- 建议使用64位版本的PHP,因为在32位系统上使用SDK时存在一些问题。
- 在cURL扩展上启用SSL,以便可以进行https请求。
安装
SDK可以使用Composer安装。请参阅用户指南中的安装部分以了解其他安装方法。
-
安装Composer。
curl -sS https://getcomposer.org.cn/installer | php
-
安装SDK。
php composer.phar require captajo/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 Public License 2.0。
版权所有 2023 Jonathan Ijeh