geekseller/ebay-sdk-php

PHP的eBay SDK。在您的PHP项目中使用eBay API。

此包的规范存储库似乎已消失,因此已冻结此包。

0.1.1 2020-08-28 18:56 UTC

This package is not auto-updated.

Last update: 2022-01-29 22:16:26 UTC


README

此eBay SDK使您能够轻松地在基于PHP的项目中使用eBay API

此存储库不是一个爱好或副项目,而是由一家盈利公司维护的代码,该公司在生产中使用它。我们承诺将其保持为开源,并在我们运营期间维护它。

关于此存储库

此存储库由公司GeekSeller.com维护,并且是另一个eBay SDK存储库的分支。原始代码是由David T. Sadler开发的,然而,在2020年2月,David存档了项目并决定不再维护它。GeekSeller在生产中使用David的SDK,因此我们决定创建此SDK的分支,将其作为一个独立的项目进行维护,并将其提供给社区。

请注意,GeekSeller是eBay开发者计划的一部分,我们已在eBay解决方案目录中列出我们的eBay应用程序,但是,此SDK不是由eBay认可、赞助或维护的。

支持

此存储库定期更新。修复报告的问题可能需要时间,但我们鼓励您提交票据、贡献力量或联系我们要求高级支持。

文档

可以在这里找到eBay API的文档。

一些使用此SDK的示例

要求

  • PHP 5.5或更高版本,以下扩展
    • cURL
    • libxml
  • 建议使用64位PHP版本,因为在使用32位系统时存在一些问题
  • 在cURL扩展上启用SSL,以便可以进行https请求。

安装

SDK可以使用Composer安装。请参阅用户指南中的安装部分了解其他安装方法。

  1. 安装Composer。

    curl -sS https://getcomposer.org/installer | php
    
  2. 安装SDK。

    php composer.phar require geekseller/ebay-sdk-php
    
  3. 通过将以下行添加到您的代码中,要求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'));