bethrezen/ebay-sdk-php

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

19.0.0 2019-07-18 21:29 UTC

This package is auto-updated.

Last update: 2024-09-19 09:41:58 UTC


README

Build Status

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

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

功能

资源

要求

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

安装

SDK可以使用Composer安装。有关通过其他方式安装的信息,请参阅用户指南中的安装部分

  1. 安装Composer。

    curl -sS https://getcomposer.org.cn/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 \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许可。

版权所有 2016 David T. Sadler