Service/Ebay/Finding.php

Show: PublicProtectedPrivateinherited
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 license@zend.com 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

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

Properties

>VPropertyprotectedmixed $_client
Details
Type
mixed
Inherited_from
\Zend_Service_Ebay_Abstract::$$_client  
>VPropertyprotectedarray $_options = array(self::OPTION_GLOBAL_ID => 'EBAY-US')
Default valuearray(self::OPTION_GLOBAL_ID => 'EBAY-US')Details
Type
array
>VPropertyprotectedarray $_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
NameTypeDescription
$options\Zend_Config | array | string

Application Id or array of options

Throws
ExceptionDescription
\Zend_Service_Ebay_Finding_ExceptionWhen application id is missing
methodprotected_findItems(array $options, string $operation) : \Zend_Service_Ebay_Finding_Response_Items

Parameters
NameTypeDescription
$optionsarray
$operationstring
Returns
TypeDescription
\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
NameTypeDescription
$options\Zend_Config | array
Returns
TypeDescription
arrayA 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
NameTypeDescription
$response\Zend_Http_Response
Returns
TypeDescription
\DOMDocument
Throws
ExceptionDescription
\Zend_Service_Ebay_Finding_ExceptionWhen any error occurrs during request
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/types/ErrorSeverity.html  
See
\Zend_Service_Ebay_Finding_Abstract::_initXPath()  
methodprotected_request(string $operation, array $options = null) : \DOMDocument

Parameters
NameTypeDescription
$operationstring
$optionsarray
Returns
TypeDescription
\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
NameTypeDescription
$keywordsstring
$descriptionSearchboolean
$categoryIdinteger
$options\Zend_Config | array
Returns
TypeDescription
\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
NameTypeDescription
$categoryIdinteger
$options\Zend_Config | array
Returns
TypeDescription
\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
NameTypeDescription
$keywordsstring
$options\Zend_Config | array
Returns
TypeDescription
\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
NameTypeDescription
$productIdinteger
$productIdTypestring

Default value is ReferenceID

$options\Zend_Config | array
Returns
TypeDescription
\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
NameTypeDescription
$storeNamestring
$options\Zend_Config | array
Returns
TypeDescription
\Zend_Service_Ebay_Finding_Response_Items
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/findItemsIneBayStores.html  
methodpublicgetClient() : \Zend_Rest_Client

Returns
TypeDescription
\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
NameTypeDescription
$categoryIdinteger
$options\Zend_Config | array
Returns
TypeDescription
\Zend_Service_Ebay_Finding_Response_Histograms
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/getHistograms.html  
methodpublicgetOption(string $name = null) : mixed
Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
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
NameTypeDescription
$keywordsstring
$options\Zend_Config | array
Returns
TypeDescription
\Zend_Service_Ebay_Finding_Response_Keywords
Details
Link
http://developer.ebay.com/DevZone/finding/CallRef/getSearchKeywordsRecommendation.html  
methodpublicgetXmlNamespaces() : array
static

Returns
TypeDescription
array
methodpublichasOption(string $name) : boolean
Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
boolean
methodpublicoptionsToArray(\Zend_Config | array $options) : array
staticinherited

Inherited from: \Zend_Service_Ebay_Abstract::optionsToArray()
Parameters
NameTypeDescription
$options\Zend_Config | array
Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Service_Ebay_Finding_ExceptionWhen $options is not an array neither a Zend_Config object
methodpublicsetClient(\Zend_Rest_Client $client) : \Zend_Service_Ebay_Finding

Parameters
NameTypeDescription
$client\Zend_Rest_Client
Returns
TypeDescription
\Zend_Service_Ebay_FindingProvides a fluent interface
methodpublicsetOption(string | \Zend_Config | array $name, mixed $value = null) : \Zend_Service_Ebay_Abstract
Parameters
NameTypeDescription
$namestring | \Zend_Config | array
$valuemixed
Returns
TypeDescription
\Zend_Service_Ebay_AbstractProvides 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
NameTypeDescription
$valuemixed
Returns
TypeDescription
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
NameTypeDescription
$valuestring
$typestring
Returns
TypeDescription
mixed
Throws
ExceptionDescription
\Zend_Service_Ebay_Finding_ExceptionWhen $type is not valid
Details
See
\http://developer.ebay.com/DevZone/finding/CallRef/types/simpleTypes.html  
Documentation was generated by phpDocumentor 2.0.0a12.