macropage/sdk-ebay-rest-browse
Composer 安装命令:
composer require macropage/sdk-ebay-rest-browse
包简介
<p>The Browse API has the following resources:</p> <ul> <li><b>item_summary: </b> Lets shoppers search for specific items by keyword, GTIN, category, charity, product, or item aspects and refine the results by using filters.</li> <li> <a href="https://developer.ebay.com/api-docs/static/versioning
README 文档
README
The Browse API has the following resources:
- item_summary: Lets shoppers search for specific items by keyword, GTIN, category, charity, product, or item aspects and refine the results by using filters.
-
(Experimental) search_by_image: Lets shoppers search for specific items by image. You can refine the results by using URI parameters and filters.
- item: Lets you retrieve the details of a specific item or all the items in an item group, which is an item with variations such as color and size. This resource also provides a bridge between the eBay legacy APIs, such as Trading and Finding, and the RESTful APIs, such as Browse, which use different formats for the item IDs. You can use the Browse API to retrieve the basic details of the item and the RESTful item ID using a legacy item ID.
(Experimental) shopping_cart: Provides the ability for eBay members to see the contents of their eBay cart, and add, remove, and change the quantity of items in their eBay cart. *Note:* This resource is not available in the eBay API Explorer.
The item_summary, search_by_image, and item resource calls require an Application access token. The shopping_cart resource calls require a User access token.
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: v1_beta.19.0
- Package version: 2.3.2
- Build package: org.openapitools.codegen.languages.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/macropage/sdk-ebay-rest-browse.git"
}
],
"require": {
"macropage/sdk-ebay-rest-browse": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
require_once('/path/to/sdk-ebay-rest-browse/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?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; } ?>
Documentation for API Endpoints
All URIs are relative to https://api.ebay.com/buy/browse/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ItemApi | checkCompatibility | POST /item/{item_id}/check_compatibility | |
| ItemApi | getItem | GET /item/{item_id} | |
| ItemApi | getItemByLegacyId | GET /item/get_item_by_legacy_id | |
| ItemApi | getItemsByItemGroup | GET /item/get_items_by_item_group | |
| ItemSummaryApi | search | GET /item_summary/search | |
| SearchByImageApi | searchByImage | POST /item_summary/search_by_image | |
| ShoppingCartApi | addItem | POST /shopping_cart/add_item | |
| ShoppingCartApi | getShoppingCart | GET /shopping_cart/ | |
| ShoppingCartApi | removeItem | POST /shopping_cart/remove_item | |
| ShoppingCartApi | updateQuantity | POST /shopping_cart/update_quantity |
Documentation For Models
- AddCartItemInput
- AdditionalProductIdentity
- Address
- Amount
- Aspect
- AspectDistribution
- AspectFilter
- AspectGroup
- AspectValueDistribution
- AttributeNameValue
- AvailabilityStatusEnum
- AvailabilityThresholdEnum
- BuyingOptionDistribution
- CartItem
- Category
- CategoryDistribution
- CommonDescriptions
- CompatibilityPayload
- CompatibilityResponse
- CompatibilityStatus
- ConditionDistribution
- ConvertedAmount
- CountryCodeEnum
- CurrencyCodeEnum
- DeliveryOptionsEnum
- Error
- ErrorDetailV3
- ErrorParameter
- ErrorParameterV3
- EstimatedAvailability
- FilterField
- Image
- Item
- ItemGroupSummary
- ItemGroupTypeEnum
- ItemLocationImpl
- ItemReturnTerms
- ItemSummary
- Items
- LegalAddress
- MarketingPrice
- PickupOptionSummary
- Price
- PriceDisplayConditionEnum
- Product
- ProductIdentity
- RangeValue
- RatingHistogram
- Refinement
- RefundMethodEnum
- Region
- RegionTypeEnum
- RemoteShopcartResponse
- RemoveCartItemInput
- ReturnMethodEnum
- ReturnShippingCostPayerEnum
- ReviewRating
- SearchByImageRequest
- SearchPagedCollection
- Seller
- SellerDetail
- SellerLegalInfo
- ShipToLocation
- ShipToLocations
- ShippingOption
- ShippingOptionSummary
- SortField
- TargetLocation
- TaxJurisdiction
- TaxType
- Taxes
- TimeDuration
- TimeDurationUnitEnum
- TypedNameValue
- UpdateCartItemInput
- ValueTypeEnum
- VatDetail
Documentation For Authorization
api_auth
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes:
- https://api.ebay.com/oauth/api_scope: View public data from eBay
bearerAuth
- Type: HTTP basic authentication
Author
macropage/sdk-ebay-rest-browse 适用场景与选型建议
macropage/sdk-ebay-rest-browse 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.21k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 03 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapitools」 「openapi-generator」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 macropage/sdk-ebay-rest-browse 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 macropage/sdk-ebay-rest-browse 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 macropage/sdk-ebay-rest-browse 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Alfabank REST API integration
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
BlockCypher's PHP SDK for REST API
Helper classes for creating cookie headers
统计信息
- 总下载量: 3.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2019-03-12