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
Installs: 2 870
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 0
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-12-08 01:04:03 UTC
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
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