Zend_Service_Ebay

Zend_Service_Ebay_Finding

Introduction

Zend_Service_Ebay_Finding provides a client for the » eBay Finding. Per eBay website, "The Finding API provides programmatic access to the next generation search capabilities on the eBay platform. It lets you search and browse for items listed on eBay, and provides useful metadata to refine searches and enhance the search experience."

In order to use Zend_Service_Ebay_Finding, you should already have an eBay Application ID. To get a key and for more information, please visit the » eBay Developers Program web site.

Create a client object

Instantiate a Zend_Service_Ebay_Finding object, passing it your private keys:

Example #1 Creating an instance of the eBay Finding service

  1. span style="color: #ff0000;">'my-app-id');

Instantiate a Zend_Service_Ebay_Finding object, passing it your private keys and setting options:

Example #2 Creating an instance of the eBay Finding service

  1. span style="color: #ff0000;">'my-app-id''EBAY-GB'

Finding items

There are five available methods to search items:

  • findItemsByKeywords($keywords)

  • findItemsByProduct($productId)

  • findItemsByCategory($categoryId)

  • findItemsAdvanced($keywords)

  • findItemsInEbayStores($storeName)

Example #3 Many ways to find items

  1. span style="color: #ff0000;">'my-app-id''zend framework book'// inner call, find for items of same current product
  2.     // like $finding->findItemsByProduct($item->productId, $item->attributes('productId', 'type'))
  3.     $response2 = $item->findItemsByProduct($finding);
  4.  
  5.     // inner call, find for items of same store
  6.     // like $finding->findItemsInEbayStores($item->storeInfo->storeName)
  7.     $response3 = $item->storeInfo->findItems($finding);
  8. }

Keywords Recommendation

This operation checks specified keywords and returns correctly spelled keywords for best search results.

Example #4 Searching keywords recomendation

  1. // searching keywords
  2. 'my-app-id''zend''Did you mean ''?';
  3.  
  4. // inner call
  5. // like $finding->findItemsByKeywords($result->keyword)
  6. $result2 = $result->findItems($finding);

Histograms

Per eBay website, this operation "category and/or aspect histogram information for the eBay category ID you specify. Histograms are item counts for the associated category or aspect value. Input category ID numbers in the request using the categoryId field".

Example #5 Fetching histogram

  1. span style="color: #ff0000;">'my-app-id'// inner call
  2.     // like $finding->findItemsByCategory($category->categoryId);
  3.     $result2 = $category->findItems($finding);
  4. }

Zend_Service_Ebay