maioradv/ebay-sdk-php

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

18.0.1 2020-07-06 14:45 UTC

README

此存储库已不再积极维护,并已存档。

此项目允许PHP开发者在其PHP代码中使用eBay API,并使用FindingTradingShopping等服务构建软件等。您可以通过使用Composer安装SDK并遵循基本使用指南来开始。

这是一个由我,David T. Sadler开发的个人项目。我决定创建这个项目来弥补PHP官方SDK的不足。它绝对不是由eBay支持、赞助或维护的。

特性

资源

需求

  • PHP 5.5或更高版本,以下扩展
    • cURL
    • libxml
  • 推荐使用64位PHP版本,因为在32位系统上使用SDK时有一些问题
  • 在cURL扩展中启用SSL,以便可以发出https请求。

安装

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

  1. 安装Composer。

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

    php composer.phar require dts/ebay-sdk-php
    
  3. 通过在代码中添加以下行来要求Composer的自动加载器。

    require 'vendor/autoload.php';

示例

获取官方eBay时间

<?php

require 'vendor/autoload.php';

use \maiorADV\eBaySDK\Shopping\Services;
use \maiorADV\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下许可。

版权所有2016 David T. Sadler

由MaiorADV于2020年更新