macropage / sdk-ebay-rest-analytics
<i>分析API</i> 提供关于卖家及其eBay业务的详细数据和信息。<br><br>此API中的资源和方法允许卖家查看他们的列表表现信息、客户服务表现指标以及他们的eBay卖家评级详情。
dev-master
2021-02-02 10:55 UTC
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2 || 7.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^7.4
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-08-29 05:19:00 UTC
README
<i>分析API</i> 提供关于卖家及其eBay业务的详细数据和信息。
此API中的资源和方法允许卖家查看他们的列表表现信息、客户服务表现指标以及他们的eBay卖家评级详情。
分析API中的三个资源提供了以下数据和信息
- 客户服务指标 - 与同一组其他卖家相比,提供卖家客户服务表现的数据。
- 流量报告 - 提供显示买家如何参与卖家列表的数据。
- 卖家标准配置文件 - 提供关于卖家评级表现的数据。
有关使用此API的详细信息,请参阅 <a href="/api-docs/sell/static/performance/analyzing-performance.html" title="Selling Integration Guide">分析卖家表现</a>。
此PHP包由 OpenAPI Generator 项目自动生成
- API版本:1.2.0
- 包版本:2.3.2
- 构建包:org.openapitools.codegen.languages.PhpClientCodegen
需求
PHP 5.5及更高版本
安装 & 使用
Composer
要使用Composer安装绑定,请将以下内容添加到 composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/macropage/sdk-ebay-rest-analytics.git" } ], "require": { "macropage/sdk-ebay-rest-analytics": "*@dev" } }
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/sdk-ebay-rest-analytics/vendor/autoload.php');
测试
要运行单元测试
composer install ./vendor/bin/phpunit
入门
请遵循 安装说明,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: api_auth $config = macropage\SDKs\ebay\rest\analytics\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new macropage\SDKs\ebay\rest\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 ); $customerServiceMetricType = 'customerServiceMetricType_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 $evaluationMarketplaceId = 'evaluationMarketplaceId_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/devzone/rest/api-ref/analytics/types/MarketplaceIdEnum.html $evaluationType = 'evaluationType_example'; // string | Use this path parameter to specify the type of the seller evaluation you want returned, either: CURRENT – A monthly evaluation that occurs on the 20th of every month. PROJECTED – 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($customerServiceMetricType, $evaluationMarketplaceId, $evaluationType); 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
模型文档
- BenchmarkMetadata
- Cycle
- Definition
- Dimension
- DimensionMetric
- Distribution
- Error
- ErrorParameter
- EvaluationCycle
- FindSellerStandardsProfilesResponse
- GetCustomerServiceMetricResponse
- Header
- Metadata
- MetadataHeader
- MetadataRecord
- Metric
- MetricBenchmark
- MetricDistribution
- Record
- Report
- StandardsProfile
- Value
授权文档
api_auth
- 类型: OAuth
- 流程: accessCode
- 授权URL: https://auth.ebay.com/oauth2/authorize
- 作用域:
- https://api.ebay.com/oauth/api_scope/sell.analytics.readonly: 查看您的销售分析数据,例如表现报告