zvps / ebay-sell-analytics-php-client

分析API提供有关卖家及其eBay业务的详细数据和信息。该API中的资源和方法允许卖家查看其列表性能信息、客户服务表现指标以及eBay卖家绩效评级详情。分析API中的三个资源提供以下数据和信息:客户服务指标 – 与同一小组内的其他卖家相比,提供卖家客户服务表现的返回数据。流量报告 – 返回买家如何参与卖家列表的数据。卖家标准配置文件 – 提供有关卖家绩效评级的返回数据。卖家可以使用各种分析API方法返回的数据和信息来确定他们可以如何改进以提高销售额,以及他们如何提高 eBay 买家的卖家状态。有关使用此API的详细信息,请参阅卖家性能分析。

dev-main 2021-07-30 16:32 UTC

This package is auto-updated.

Last update: 2024-09-29 05:56:46 UTC


README

分析API提供有关卖家及其eBay业务的详细数据和信息。该API中的资源和方法允许卖家查看其列表性能信息、客户服务表现指标以及eBay卖家绩效评级详情。分析API中的三个资源提供以下数据和信息:客户服务指标 – 与同一小组内的其他卖家相比,提供卖家客户服务表现的返回数据。流量报告 – 返回买家如何参与卖家列表的数据。卖家标准配置文件 – 提供有关卖家绩效评级的返回数据。卖家可以使用各种分析API方法返回的数据和信息来确定他们可以如何改进以提高销售额,以及他们如何提高 eBay 买家的卖家状态。有关使用此API的详细信息,请参阅卖家性能分析。

安装和用法

要求

PHP 7.2 及以上版本。

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github/zvps/ebay-sell-analytics-php-client.git"
    }
  ],
  "require": {
    "zvps/ebay-sell-analytics-php-client": "*@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: Authorization Code
$config = Ebay\Sell\Analytics\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Ebay\Sell\Analytics\Api\CustomerServiceMetricApi(
    // 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
);
$customer_service_metric_type = 'customer_service_metric_type_example'; // string | Use this path parameter to specify the type of customer service metrics and benchmark data you want returned for the seller. Supported types are: ITEM_NOT_AS_DESCRIBED ITEM_NOT_RECEIVED
$evaluation_marketplace_id = 'evaluation_marketplace_id_example'; // string | Use this query parameter to specify the Marketplace ID to evaluate for the customer service metrics and benchmark data. For the list of supported marketplaces, see Analytics API requirements and restrictions. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/analytics/types/bas:MarketplaceIdEnum
$evaluation_type = 'evaluation_type_example'; // string | Use this path parameter to specify the type of the seller evaluation you want returned, either: CURRENT &ndash; A monthly evaluation that occurs on the 20th of every month. PROJECTED &ndash; A daily evaluation that provides a projection of how the seller is currently performing with regards to the upcoming evaluation period.

try {
    $result = $apiInstance->getCustomerServiceMetric($customer_service_metric_type, $evaluation_marketplace_id, $evaluation_type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerServiceMetricApi->getCustomerServiceMetric: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI都是相对于 https://api.ebay.com/sell/analytics/v1

模型

授权

授权代码

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

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

  • API版本: 1.2.0
    • 包版本: 5.0.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen