ansas/ebay-rest-api

dev-master 2022-05-12 08:11 UTC

This package is auto-updated.

Last update: 2024-09-11 02:03:59 UTC


README

Feed API 允许卖家上传输入文件,下载包含其状态的报告和文件,使用 URI 参数过滤报告,以及检索客户服务指标任务详情。

安装与使用

要求

PHP 7.2 及更高版本。

Composer

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

{
  "require": {
    "ansas/ebay-rest-api": "dev-master"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/ansas/ebay-rest-api/vendor/autoload.php');

入门

请按照 安装过程 进行操作,然后运行以下命令

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



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


$apiInstance = new Ansas\Ebay\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
);
$acceptLanguage = 'acceptLanguage_example'; // string | Use this header to specify the natural language in which the authenticated user desires the response.
$createServiceMetricsTaskRequest = new \Ansas\Ebay\Model\CreateServiceMetricsTaskRequest(); // \Ansas\Ebay\Model\CreateServiceMetricsTaskRequest | Request payload containing version, feedType, and optional filterCriteria.

try {
    $apiInstance->createCustomerServiceMetricTask($acceptLanguage, $createServiceMetricsTaskRequest);
} 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
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen