nogrod/ebay-sell-feed-php-sdk

<p>《数据源API》允许卖家上传输入文件,下载包括其状态的报告和文件,使用URI参数筛选报告,并检索客户服务指标任务详情。</p>

v0.3.2 2024-05-30 15:20 UTC

This package is auto-updated.

Last update: 2024-09-30 16:03:16 UTC


README

《数据源API》允许卖家上传输入文件,下载包括其状态的报告和文件,使用URI参数筛选报告,并检索客户服务指标任务详情。

安装和用法

需求

PHP 8.1 及更高版本。

Composer

要通过Composer安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/nogrod/ebay-sell-feed-php-sdk.git"
    }
  ],
  "require": {
    "nogrod/ebay-sell-feed-php-sdk": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门

请遵循 安装过程,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: api_auth
$config = eBay\Sell\Feed\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new eBay\Sell\Feed\Api\CustomerServiceMetricTaskApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$accept_language = 'accept_language_example'; // string | Use this header to specify the natural language in which the authenticated user desires the response. For example, <code>en-US</code> for English or <code>de-DE</code> for German.
$create_service_metrics_task_request = new \eBay\Sell\Feed\Model\CreateServiceMetricsTaskRequest(); // \eBay\Sell\Feed\Model\CreateServiceMetricsTaskRequest | Request payload containing version, feedType, and optional filterCriteria.

try {
    $apiInstance->createCustomerServiceMetricTask($accept_language, $create_service_metrics_task_request);
} catch (Exception $e) {
    echo 'Exception when calling CustomerServiceMetricTaskApi->createCustomerServiceMetricTask: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI均相对于 https://api.ebay.com/sell/feed/v1

模型

授权

api_auth

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

此PHP包由 OpenAPI Generator 项目自动生成

  • API版本: v1.3.1
    • 包版本: 0.0.1
    • 生成器版本: 7.6.0
  • 构建包: org.openapitools.codegen.languages.PhpNextgenClientCodegen