zvps / ebay-sell-metadata-php-client
元数据API提供了检索不同eBay市场配置详情的操作。除了市场信息外,API还提供了帮助卖家在eBay上列出商品的信息操作。
dev-main
2021-07-30 16:32 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-29 06:03:05 UTC
README
元数据API提供了检索不同eBay市场配置详情的操作。除了市场信息外,API还提供了帮助卖家在eBay上列出商品的信息操作。
安装与使用
要求
PHP 7.2及以后版本。
Composer
要使用Composer安装绑定,请在composer.json中添加以下内容
{
"repositories": [
{
"type": "vcs",
"url": "https://github/zvps/ebay-sell-metadata-php-client.git"
}
],
"require": {
"zvps/ebay-sell-metadata-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: Client Credentials $config = Ebay\Sell\Metadata\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Ebay\Sell\Metadata\Api\CountryApi( // 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 ); $country_code = 'country_code_example'; // string | This path parameter specifies the two-letter ISO 3166 country code for the country whose jurisdictions you want to retrieve. eBay provides sales tax jurisdiction information for Canada and the United States.Valid values for this path parameter are CA and US. try { $result = $apiInstance->getSalesTaxJurisdictions($country_code); print_r($result); } catch (Exception $e) { echo 'Exception when calling CountryApi->getSalesTaxJurisdictions: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI均相对于https://api.ebay.com/sell/metadata/v1
模型
- AutomotivePartsCompatibilityPolicy
- AutomotivePartsCompatibilityPolicyResponse
- Error
- ErrorParameter
- Exclusion
- ItemCondition
- ItemConditionPolicy
- ItemConditionPolicyResponse
- ListingStructurePolicy
- ListingStructurePolicyResponse
- NegotiatedPricePolicy
- NegotiatedPricePolicyResponse
- ProductAdoptionPolicy
- ProductAdoptionPolicyResponse
- ReturnPolicy
- ReturnPolicyDetails
- ReturnPolicyResponse
- SalesTaxJurisdiction
- SalesTaxJurisdictions
- TimeDuration
授权
授权代码
- 类型:
OAuth - 流程:
accessCode - 授权URL:
https://auth.ebay.com/oauth2/authorize - 作用域:
- https://api.ebay.com/oauth/api_scope/sell.inventory: 查看和管理您的库存和报价
客户端凭据
- 类型:
OAuth - 流程:
application - 授权URL: ``
- 作用域:
- https://api.ebay.com/oauth/api_scope: 查看eBay的公开数据
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包是由OpenAPI Generator项目自动生成的
- API版本:
v1.4.1- 包版本:
5.0.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen