macropage / sdk-ebay-rest-browse
<p>浏览API具有以下资源:</p> <ul> <li><b>item_summary: </b> 允许购物者通过关键词、GTIN、类别、慈善机构、产品或项目方面等搜索特定项目,并通过使用过滤器来细化结果。</li> <li> <a href="https://developer.ebay.com/api-docs/static/versioning
dev-master
2019-03-12 17:11 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: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-08 00:32:06 UTC
README
浏览API具有以下资源
- item_summary: 允许购物者通过关键词、GTIN、类别、慈善机构、产品或项目方面等搜索特定项目,并通过使用过滤器来细化结果。
-
(实验性) search_by_image: 允许购物者通过图像搜索特定项目。您可以通过URI参数和过滤器来细化结果。
- item: 允许您检索特定项目的详细信息或项目组的所有项目,项目组是一个具有如颜色和尺寸等变化的项目。此资源还提供了 eBay 旧版 API(如 Trading 和 Finding)与 RESTful API(如 Browse)之间的桥梁,后者使用不同的项目 ID 格式。您可以使用 Browse API 使用旧版项目 ID 获取项目的详细信息和使用 RESTful 项目 ID。您可以使用 Browse API 使用旧版项目 ID 获取项目的详细信息和使用 RESTful 项目 ID。
(实验性) shopping_cart: 提供了 eBay 成员查看其 eBay 购物车内容、添加、删除和更改其 eBay 购物车中项目数量的功能。 注意: 此资源在 eBay API 探索器中不可用。
item_summary、search_by_image 和 item 资源调用需要 应用程序访问令牌。 shopping_cart 资源调用需要 用户访问令牌。
此 PHP 软件包由 OpenAPI Generator 项目自动生成
- API 版本:v1_beta.19.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-browse.git"
}
],
"require": {
"macropage/sdk-ebay-rest-browse": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/sdk-ebay-rest-browse/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\browse\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new macropage\SDKs\ebay\rest\browse\Api\ItemApi( // 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 ); $itemId = 'itemId_example'; // string | The eBay RESTful identifier of an item (such as a part you want to check). This ID is returned by the Browse and Feed API methods. RESTful Item ID Format: v1|#|# For example: v1|272394640372|0 or v1|162846450672|461882996982 For more information about item ID for RESTful APIs, see the Legacy API compatibility section of the Buy APIs Overview. $xEBAYCMARKETPLACEID = 'xEBAYCMARKETPLACEID_example'; // string | The ID of the eBay marketplace you want to use. Note: This value is case sensitive. For example: X-EBAY-C-MARKETPLACE-ID = EBAY_US For a list of supported sites see, API Restrictions. $compatibilityPayload = new \macropage\SDKs\ebay\rest\browse\Model\CompatibilityPayload(); // \macropage\SDKs\ebay\rest\browse\Model\CompatibilityPayload | try { $result = $apiInstance->checkCompatibility($itemId, $xEBAYCMARKETPLACEID, $compatibilityPayload); print_r($result); } catch (Exception $e) { echo 'Exception when calling ItemApi->checkCompatibility: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 https://api.ebay.com/buy/browse/v1
模型文档
- AddCartItemInput
- AdditionalProductIdentity
- Address
- Amount
- Aspect
- AspectDistribution
- AspectFilter
- AspectGroup
- AspectValueDistribution
- AttributeNameValue
- AvailabilityStatusEnum
- AvailabilityThresholdEnum
- BuyingOptionDistribution
- CartItem
- Category
- CategoryDistribution
- CommonDescriptions
- CompatibilityPayload
- CompatibilityResponse
- CompatibilityStatus
- ConditionDistribution
- 转换金额
- 国家代码枚举
- 货币代码枚举
- 配送选项枚举
- 错误
- 错误详情V3
- 错误参数
- 错误参数V3
- 预计可用性
- 筛选字段
- 图片
- 项目
- 项目组摘要
- 项目组类型枚举
- 项目位置实现
- 退货条款
- 项目摘要
- 项目列表
- 法律地址
- 营销价格
- 取货选项摘要
- 价格
- 价格显示条件枚举
- 产品
- 产品标识
- 范围值
- 评分直方图
- 细化
- 退款方式枚举
- 地区
- 地区类型枚举
- 远程购物车响应
- 移除购物车项目输入
- 退货方式枚举
- 退货运输费用支付者枚举
- 评论评分
- 通过图片搜索请求
- 搜索分页集合
- 卖家
- 卖家详情
- 卖家法律信息
- 送货地址
- 送货地址列表
- 配送选项
- 配送选项摘要
- 排序字段
- 目标位置
- 税务管辖区域
- 税种
- 税费
- 时间持续时间
- 时间持续时间单位枚举
- 类型名称值
- 更新购物车项目输入
- 值类型枚举
- 增值税详情
授权文档
api_auth
- 类型: OAuth
- 流程: application
- 授权URL:
- 作用域:
- https://api.ebay.com/oauth/api_scope: 查看eBay的公共数据
bearerAuth
- 类型: HTTP基本认证