Service/Ebay/Finding.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service  
Subpackage
Ebay  
Version
$Id: Finding.php 22824 2010-08-09 18:59:54Z renanbr $  

\Zend_Service_Ebay_Finding

Package: Zend\Service\Ebay

Parent(s)
\Zend_Service_Ebay_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
\global\Zend_Service_Ebay_Abstract  

Constants

Constant  SERVICE_NAME = 'FindingService'
Constant  SERVICE_VERSION = '1.0.0'
Constant  RESPONSE_DATA_FORMAT = 'XML'
Constant  ENDPOINT_URI = 'http://svcs.ebay.com'
Constant  ENDPOINT_PATH = 'services/search/FindingService/v1'
Constant  XMLNS_FINDING = 'e'
Constant  XMLNS_MS = 'ms'
Constant  OPTION_APP_ID = 'app_id'
Constant  OPTION_GLOBAL_ID = 'global_id'

Properties

Propertyprotectedmixed $_client =
inherited

Inherited from: \Zend_Service_Ebay_Abstract::$$_client
Details
Type
mixed
Inherited_from
\Zend_Service_Ebay_Abstract::$$_client  
Propertyprotectedarray $_options = array(self::OPTION_GLOBAL_ID => 'EBAY-US')

Default valuearray(self::OPTION_GLOBAL_ID => 'EBAY-US')Details
Type
array
Propertyprotectedarray $_xmlNamespaces = array(self::XMLNS_FINDING => 'http://www.ebay.com/marketplace/search/v1/services', self::XMLNS_MS => 'http://www.ebay.com/marketplace/services')
static

Default valuearray(self::XMLNS_FINDING => 'http://www.ebay.com/marketplace/search/v1/services', self::XMLNS_MS => 'http://www.ebay.com/marketplace/services')Details
Type
array

Methods

methodpublic__construct(\Zend_Config | array | string $options) : void

Parameters
Name Type Description
$options \Zend_Config | array | string

Application Id or array of options

Throws
Exception Description
\Zend_Service_Ebay_Finding_Exception When application id is missing
methodprotected_findItems(array $options, string $operation) : \Zend_Service_Ebay_Finding_Response_Items

Parameters
Name Type Description
$options array
$operation string
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Items
methodprotected_optionsToNameValueSyntax(\Zend_Config | array $options) : array
inherited

Implements Name-value Syntax translator.

Inherited from: \Zend_Service_Ebay_Abstract::_optionsToNameValueSyntax()

Example:

array( 'paginationInput' => array( 'entriesPerPage' => 5, 'pageNumber' => 2 ), 'itemFilter' => array( array( 'name' => 'MaxPrice', 'value' => 25, 'paramName' => 'Currency', 'paramValue' => 'USD' ), array( 'name' => 'FreeShippingOnly', 'value' => true ), array( 'name' => 'ListingType', 'value' => array( 'AuctionWithBIN', 'FixedPrice', 'StoreInventory' ) ) ), 'productId' => array( '' => 123, 'type' => 'UPC' ) )

this above is translated to

array( 'paginationInput.entriesPerPage' => '5', 'paginationInput.pageNumber' => '2', 'itemFilter(0).name' => 'MaxPrice', 'itemFilter(0).value' => '25', 'itemFilter(0).paramName' => 'Currency', 'itemFilter(0).paramValue' => 'USD', 'itemFilter(1).name' => 'FreeShippingOnly', 'itemFilter(1).value' => '1', 'itemFilter(2).name' => 'ListingType', 'itemFilter(2).value(0)' => 'AuctionWithBIN', 'itemFilter(2).value(1)' => 'FixedPrice', 'itemFilter(2).value(2)' => 'StoreInventory', 'productId' => '123', 'productId.@type' => 'UPC' )

Parameters
Name Type Description
$options \Zend_Config | array
Returns
Type Description
array A simple array of strings
Details
Link
http://developer.ebay.com/DevZone/finding/Concepts/MakingACall.html#nvsyntax  
methodprotected_parseResponse(\Zend_Http_Response $response) : \DOMDocument

Search for error from request.

If any error is found a DOMDocument is returned, this object contains a DOMXPath object as "ebayFindingXPath" attribute.

Parameters
Name Type Description
$response \Zend_Http_Response
Returns
Type Description
\DOMDocument
Throws
Exception Description
\Zend_Service_Ebay_Finding_Exception When any error occurrs during request
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/types/ErrorSeverity.html  
See
\global\Zend_Service_Ebay_Finding_Abstract::_initXPath()  
methodprotected_request(string $operation, array $options = null) : \DOMDocument

Parameters
Name Type Description
$operation string
$options array
Returns
Type Description
\DOMDocument
Details
Link
http://developer.ebay.com/DevZone/finding/Concepts/MakingACall.html#StandardURLParameters  
methodpublicfindItemsAdvanced(string $keywords, boolean $descriptionSearch = true, integer $categoryId = null, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_Items

Finds items by a keyword query and/or category and allows searching within item descriptions.

Parameters
Name Type Description
$keywords string
$descriptionSearch boolean
$categoryId integer
$options \Zend_Config | array
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Items
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/findItemsAdvanced.html  
methodpublicfindItemsByCategory(integer $categoryId, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_Items

Finds items in a specific category.

Results can be filtered and sorted.

Parameters
Name Type Description
$categoryId integer
$options \Zend_Config | array
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Items
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/findItemsByCategory.html  
methodpublicfindItemsByKeywords(string $keywords, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_Items

Finds items on eBay based upon a keyword query and returns details for matching items.

Parameters
Name Type Description
$keywords string
$options \Zend_Config | array
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Items
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/findItemsByKeywords.html  
methodpublicfindItemsByProduct(integer $productId, string $productIdType = null, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_Items

Finds items based upon a product ID, such as an ISBN, UPC, EAN, or ePID.

Parameters
Name Type Description
$productId integer
$productIdType string

Default value is ReferenceID

$options \Zend_Config | array
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Items
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct.html  
methodpublicfindItemsInEbayStores(string $storeName, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_Items

Finds items in eBay stores.

Can search a specific store or can search all stores with a keyword query.

Parameters
Name Type Description
$storeName string
$options \Zend_Config | array
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Items
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/findItemsIneBayStores.html  
methodpublicgetClient() : \Zend_Rest_Client

Returns
Type Description
\Zend_Rest_Client
methodpublicgetHistograms(integer $categoryId, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_Histograms

Gets category and/or aspect metadata for the specified category.

Parameters
Name Type Description
$categoryId integer
$options \Zend_Config | array
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Histograms
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/getHistograms.html  
methodpublicgetOption(string $name = null) : mixed
inherited

Inherited from: \Zend_Service_Ebay_Abstract::getOption()
Parameters
Name Type Description
$name string
Returns
Type Description
mixed
methodpublicgetSearchKeywordsRecommendation(string $keywords, \Zend_Config | array $options = null) : \Zend_Service_Ebay_Finding_Response_Keywords

Checks specified keywords and returns correctly spelled keywords for best search results.

Parameters
Name Type Description
$keywords string
$options \Zend_Config | array
Returns
Type Description
\Zend_Service_Ebay_Finding_Response_Keywords
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/getSearchKeywordsRecommendation.html  
methodpublicgetXmlNamespaces() : array
static

Returns
Type Description
array
methodpublichasOption(string $name) : boolean
inherited

Inherited from: \Zend_Service_Ebay_Abstract::hasOption()
Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicoptionsToArray(\Zend_Config | array $options) : array
staticinherited

Inherited from: \Zend_Service_Ebay_Abstract::optionsToArray()
Parameters
Name Type Description
$options \Zend_Config | array
Returns
Type Description
array
Throws
Exception Description
\Zend_Service_Ebay_Finding_Exception When $options is not an array neither a Zend_Config object
methodpublicsetClient(\Zend_Rest_Client $client) : \Zend_Service_Ebay_Finding

Parameters
Name Type Description
$client \Zend_Rest_Client
Returns
Type Description
\Zend_Service_Ebay_Finding Provides a fluent interface
methodpublicsetOption(string | \Zend_Config | array $name, mixed $value = null) : \Zend_Service_Ebay_Abstract
inherited

Inherited from: \Zend_Service_Ebay_Abstract::setOption()
Parameters
Name Type Description
$name string | \Zend_Config | array
$value mixed
Returns
Type Description
\Zend_Service_Ebay_Abstract Provides a fluent interface
methodpublictoEbayValue(mixed $value) : string
staticinherited

Translate native PHP values format to ebay format for request.

Inherited from: \Zend_Service_Ebay_Abstract::toEbayValue()

Boolean is translated to "0" or "1", date object generates ISO 8601, everything else is translated to string.

Parameters
Name Type Description
$value mixed
Returns
Type Description
string
methodpublictoPhpValue(string $value, string $type) : mixed
staticinherited

Translate an ebay value format to native PHP type.

Inherited from: \Zend_Service_Ebay_Abstract::toPhpValue()
Parameters
Name Type Description
$value string
$type string
Returns
Type Description
mixed
Throws
Exception Description
\Zend_Service_Ebay_Finding_Exception When $type is not valid
Details
See
\global\http://developer.ebay.com/DevZone/finding/CallRef/types/simpleTypes.html  
Documentation was generated by phpDocumentor 2.0.0a8.